Something has changed from facebook v2.3 APIs to v2.4 - after using 2.4 I can only get the name and ID,
I saw several posts about adding "? Fields = scopes ...", but for me it was a real mystery - I'm trying to figure out how to send these field fields ...
Here is my code:
var facebookAuthOptions = new FacebookAuthenticationOptions(); facebookAuthOptions.AppId = facebookAuthAppId; facebookAuthOptions.AppSecret = facebookAuthAppSecret; facebookAuthOptions.Scope.Add("email"); facebookAuthOptions.Scope.Add("user_birthday"); facebookAuthOptions.Scope.Add("public_profile"); facebookAuthOptions.Provider = new FacebookAuthenticationProvider() { OnAuthenticated = (context) => { // https://stackoverflow.com/questions/25966530/asp-net-mvc-5-1-c-sharp-owin-facebook-authentication-or-login-ask-for-birthday/25967936
Thanks in advance.
UPDATE 1: I tried to enter the scope fields as follows:
facebookAuthOptions.UserInformationEndpoint += "?fields=email,user_birthday,first_name,last_name";
But still not working ...
UPDATE 2: I found this post that allows you to receive email, but I need to install an additional Facebook SDK for .NET , which I prefer to avoid ... also found this post that shows how to extract more values, like birthday ( in facebook API v4.3 I had to send a birthday, not user_birthday) dynamic myInfo = fb.Get ("/ me? fields = email, birthday"); I'm still looking for a way to send region values ββusing standard Oauth2 methods ...
UPDATE 3: I managed to get more information using the .NET.NET SDK - stack overflow.site/questions/89132 / ... But still prefer not to do this with the standard Oauth2 (and Owin) without using the .NET.NET SDK. ..
Yovav Aug 09 '15 at 23:47 2015-08-09 23:47
source share