0

I’m working with cURL & Facebook sdk for 5-6 years, and had no trouble at all. My app is on the 2.8 version of the Graph API.

But now, I suddenly can’t receive the user’s email address after he logs in my site and a unique personal token is generated for him.

I mean my scope is: public_profile, email. that’s all. I first noticed it when I looked at my database and saw that there are empty rows of “email”.

So I joined Auth0, to check what’s the issue. And also on this platform, I can’t get any email address although the “email” permission is allowed by Facebook by any app and does not require any additional approval or review by them.

I’m getthing this info:

“sub”: “facebook|1031231212355512”,

“given_name”: “Ted”,

“family_name”: “Mosby”,

“nickname”: “tudalos98”,

“name”: “Ted Mosby”,

“picture”: “xxxxxxxx”,

“gender”: “male”,

“locale”: “en-US”,

“updated_at”: “2018-07-09T12:31:12.593Z”

}

there’s no “email” line at all as you can see…

I re-checked this more than 3 times, re-checked myself and ticked the “email” box & re-checked the scope parameters in the url before logging to the app.

I also checked it with 3 different users, all 3 verified emails.

The really strange thing is that I don’t know what’s the “nickname” line is realated to… I mean facebook doesn’t let you choose a “nickname”. There are only your first&last name & your username(which comes right after facebook.com/myusername)

The strange thing is the “nickname” that is mentioned here, is not the “username” that comes after facebook.com/ BUT this is the username of my email address. I mean:

My email address is:

tudalos98@gmail. com

my facebook short link is:

facebook.com/ted.mosby.9

and there is the “nickname” that is fetched by facebook:

“nickname”: “tudalos98”,

Where do you think is the problem?

Thanks alot.

5
  • Let's go GDPR! I love you! Now, on a more serious note: which version of the Graph API are you on?
    – Loek
    Commented Jul 9, 2018 at 13:04
  • lol you made me smile.. i'm on v2.8. sorry for not mentioning.
    – BenTyler
    Commented Jul 9, 2018 at 13:13
  • I've seen some issues before with the latest SDK on older versions but this is really weird. Can't help you further, maybe someone else can?
    – Loek
    Commented Jul 9, 2018 at 13:31
  • I very much doubt that this nickname value is actually fetched from Facebook. (sub, given_name, family_name aren’t Graph API field names either.) Much more likely that your system generates this automatically itself, when the user creates an account (implicitly, by logging in with Facebook for the first time.)
    – CBroe
    Commented Jul 9, 2018 at 13:51
  • What is the actual API request your system is making to request those user details?
    – CBroe
    Commented Jul 9, 2018 at 13:52

0