Adding Facebook Permissions in OpenAuth.RequestAuthentication

Reeperync

New Member
I am using Asp.Net 4.5 in Visual Studio to implement Facebook Login for my website. Specially, I'm using the \[code\]Microsoft.AspNet.Membership.OpenAuth\[/code\] and related classes in the .Net framework. I can retrieve basic information from Facebook with no issue; however, I need to request permissions for more Facebook info of the user.To be clearer, the following method in \[code\]OpenAuthProviders.asxc.cs\[/code\] leads user to Facebook and pops up the Facebook dialog box asking for user permission:\[code\]OpenAuth.RequestAuthentication(provider, redirectUrl);\[/code\]This function redirects to an URL of the following format:\[code\]https://www.facebook.com/dialog/oauth?client_id=xxx&redirect_uri=xxx&__provider__=facebook&__sid__=xxx&scope=email\[/code\]My question is, currently the scope in the URL is always \[code\]email\[/code\]. How do we add more to the scope, e.g. user birthday, user picture URL, through the \[code\]OpenAuth.RequestAuthentication\[/code\] function?If I have to code a new deeper function to talk to Facebook directly just to achieve this, it seems a bit counter-intuitive why I am using this OpenAuth class in the first place.Any advice appreciated!
 
Back
Top