Using the new mvc4 now gives us access to use facebook oauth otb.
I have created a new app within facebook and have set some extra requirements around asking permission for the users email address/location & birthday.
I have saved the changes within fb and when clicking on the preview auth dialog I can see the extra permissions I want displayed within the preview window.
When I try authenticate against facebook I am not asked if I give permission to the extra fields I setup within facebook.
Is there something else within my mvc application I need to change to pass these extra requirements to facebook?
Thanks for any help.
It seems that you have to write your own custom provider. If so, you should look at
http://blogs.msdn.com/b/webdev/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx
and
http://blog.mrroa.com/post/30454808112/asp-net-custom-linkedin-oauth-provider
What I do is :
In
AccountController:– I add using Facebook; (
facebook.dllfrom http://www.csharpsdk.org)also in
AccountController, find inExternalLoginCallback:Here, i use the facebook c# sdk to ask for extra permissions before invoking
CreateOrUpdateAccount.I don’t think this is the best solution but it works.