Facebook (OAuthException - # 100) Tried to access a nonexistent field (first_name) in type node (AnonymousUser)

I used Facebook to enter the application for a while without any problems. We made a big update on our website, and now I continue to receive this error from some users, and only in our Android cordova application

(OAuthException - # 100) (# 100) Tried to access a nonexistent field (first_name) by type node (AnonymousUser)

I can not reproduce the error, I tried many different things, with the Facebook application installed, different users, different phones.

I use this code in C # to get a user

var fb = new Facebook.FacebookClient(accessToken); fb.Version = "v2.8"; dynamic me = fb.Get("me?fields=first_name,last_name,id,email, gender"); 

But if I do it

 dynamic me = fb.Get("me?fields=id"); 

Then it works and gives me an identifier, but I thought that first_name and last_name are always available.

I do not see anything in our update that breaks this, and I cannot understand how the token will be for an anonymous user. How can you get such a token?

Edit Here is the entry code to the cordova

 facebookConnectPlugin.login( ["email"], // array of permissions function (response: any) { ... }, function (response: any) { ... } ); 
+5
source share
2 answers

I have the same problem too, someone reported on facebook https://developers.facebook.com/bugs/173424853153369/

+3
source

Workaround until facebook fixes its error to add public_profile to the list of allowed requests

 facebookConnectPlugin.login( ["public_profile", "email"], // array of permissions function (response: any) { ... }, function (response: any) { ... } ); 
0
source

Source: https://habr.com/ru/post/1264308/


All Articles