Tag: facebook login

ASP.NET MVC 5.1 C#OWIN facebook身份validation或登录请求生日,喜欢,公开个人资料,电话号码

我看过很多关于facebook身份validation的post,要么是旧的,要么是不正常的。 然而,最后我在我的项目中做了一些有效但不完全的东西。 这是我要求的代码 var facebookAuthenticationOptions = new FacebookAuthenticationOptions() { AppId = “…ID”, AppSecret = “…AppSecret”, AuthenticationType = “Facebook”, SignInAsAuthenticationType = “ExternalCookie”, //Provider = new FacebookAuthenticationProvider //{ // OnAuthenticated = async ctx => // { // if (ctx.User[“birthday”] != null) // { // ctx.Identity.AddClaim(new Claim(ClaimTypes.DateOfBirth,ctx.User[“birthday”].ToString())); // } // } //} }; facebookAuthenticationOptions.Scope.Add(“user_birthday”); //facebookAuthenticationOptions.Scope.Add(“first_name”); //facebookAuthenticationOptions.Scope.Add(“last_name”); //page goes […]