首先你桅杆有Owin版本:
3.1.0
安裝了的NuGet
我發現了一些類似的解決方案,我改變它並更新它以獲得更多的Facebook用戶喜歡的其它功能和是偉大的工作
這裏是代碼(粘貼Startup.Auth):
var facebookOptions = new FacebookAuthenticationOptions()
{
AppId = "-----copy from your facebook app-----",
AppSecret = "-----copy from your facebook app-----",
Provider = new FacebookAuthenticationProvider
{
OnAuthenticated = context =>
{
context.Identity.AddClaim(new System.Security.Claims.Claim("FacebookAccessToken", context.AccessToken));
return Task.FromResult(true);
}
},
//BackchannelHttpHandler = new FacebookBackChannelHandler(),
//UserInformationEndpoint = "https://graph.facebook.com/v2.4/me?fields=id,name,email,first_name,last_name,location"
};
facebookOptions.Scope.Add("email");
//facebookOptions.Scope.Add("user_likes");
app.UseFacebookAuthentication(facebookOptions);
固定我的問題 - 謝謝!進一步調查問題後,以下是停止工作的原因:https://github.com/aspnet/AspNetKatana/issues/38 – Rick