1

I want to be able to login with Facebook and then retrieve the user ID and email.

I am using AuthenticationManager.GetExternalLoginInfoAsync(); to get the user login information, but it only returns the username.

Before Owin I had DotNetOpenAuth.AspNet.AuthenticationResult and it had a Dictionary with extra information, so I could grab for example

result.ExtraData.TryGetValue("name", out aux);

Now with Owin I don't know how to grab this information. How can I get the user email from Facebook, for example?

BrunoLM
  • 97,872
  • 84
  • 296
  • 452

1 Answers1

0

To access information returned by facebook after successful authentication you can try to implement the OWIN facebook middleware's provider method like in this post. You can also request for additional information from facebook by adding more scopes.

Community
  • 1
  • 1
Praburaj
  • 11,417
  • 1
  • 23
  • 20