asp.net mvc 5 - AuthenticationManager.GetExternalLoginInfoAsync() in Facebook -


i created default mvc5 project , add facebook api keys;

startup.auth.cs

using microsoft.owin.security.facebook;              app.usefacebookauthentication(                appid: "id-here",                appsecret: "secret-id-here"); 

then set breakpoint @ externallogincallback method @ accountcontroller.

[allowanonymous]     public async task<actionresult> externallogincallback(string returnurl)     {         var logininfo = await authenticationmanager.getexternallogininfoasync();         if (logininfo == null)         {             return redirecttoaction("login");         } 

but, authenticationmanager.getexternallogininfoasync() returns username , email empty.

how set owin include facebook email?

my problem solve after install-package microsoft.owin.security.facebook -pre.

so install package console manager install-package microsoft.owin.security.facebook -pre , facebook login info.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -