Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph API returning an empty email

I have the permissions to access user's email. The script works fine. There are several thousands of records, all with correct email, but some of them have an empty string (5:1000).

I know that if user refuses to give out his email, then Facebook generates a temporary one. Thus, this is not the case.

What is happening? Can there be a user without email address?

like image 478
Gajus Avatar asked Mar 07 '12 12:03

Gajus


1 Answers

The temporary/proxy email address was an option in the permissions dialog that the user could opt to provide you instead of their real address, it wasn't an automatic thing.

Some users don't have an email address on their profiles (e.g. users that signed up via mobile phone before it was mandatory to also provide an email address).

You should also check if the user has definitely granted you the email extended permission and / or it hasn't subsequently been revoked. You can do this with a call to /<USER>/permissions with the user or app access token

If you can confirm that the user has an active email address on their account, they've granted your app permission to view their email, and they haven't subsequently blocked the app or revoked the permission, it may be a bug with the API (in which case please file a report at http://developers.facebook.com/bugs )

like image 53
Igy Avatar answered Oct 07 '22 22:10

Igy