Search code examples
asp.net-mvcfacebookasp.net-mvc-4simplemembership

Get Facebook extra details in MVC 4 using simple membership Provider


Currently I used default

OAuthWebSecurity.RegisterFacebookClient(appId: "", appSecret: "");

to authorize the Facebook user.

Also it will add UserName into UserProfile table. Now is there any way can I access and store some default details from user's Facebook account into the same table?

Let's say I need Email, Birthday, First Name , last Name.

What changes do I need to make into the default table UserProfile which created as part of Simple Membership. And what changes I need to make in Account Model and Account Controller?


Solution

  • Please see the link below:

    Using OAuth Providers with MVC 4

    Hope this helps you out.