Posted on: 8/7/2013 5:52:32 PM | Views : 861

I am using the standard MVC5 project template to authenticate my web site users through Facebook.
It is all working perfectly using default setup code in Startup.Auth.cs:
app.UseFacebookAuthentication( appId: ConfigurationManager.AppSettings["Facebook:AppId"], appSecret: ConfigurationManager.AppSettings["Facebook:AppSecret"]); However, I have a business need to set the Facebook scope to get permission from my users to get their email address (+ more). I have had a look at the Owin.Security.Facebook object browser and saw that I can pass FacebookAuthenticationOptions to UseFacebookAuthentication. I tried to replace the above code with:
app.UseFacebookAuthentication(new FacebookAuthenticationOptions { AppId = ConfigurationManager.AppSettings["Facebook:AppId"], AppSecret = ConfigurationManager.AppSettings["Facebook:AppSecret"], Scope = "email" }); I ran the app an ...

Go to the complete details ...