Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Created a new project in MVC5 (identity).
Registered the app for facebook authentication.


Startup.Auth.cs

app.UseFacebookAuthentication(
appId: "1474706466175318",
appSecret: "a616c710d8ee3816929e1d3a7e9ea0ee");

AccountController.cs

[AllowAnonymous]
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
if (loginInfo == null)-->I am gettting the email id null when i set a breakpoint here
Posted
Updated 2-Aug-15 19:14pm
v2
Comments
Dave Kreskowiak 1-Aug-15 9:44am    
So were you looking for someone to write your code for you or did you forget to ask a question about some problem you're having with yours?
Member 10774887 1-Aug-15 9:49am    
Sorry.I was able to implement the requirement, but not able to get the email Id of the user using fb authentication. So wanted to know whether it is possible to get the mail Id in mvc identity or not?I could not achieve this...so was looking for some help if anyone had faced this problem... All solution till date use the asp.net membership to achieve the same

1 solution

 
Share this answer
 
Comments
Member 10774887 3-Aug-15 1:08am    
None of the solutions worked.I was still getting the email null.
You need to dig and debug more. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900