Can't retrieve user's mail address from Facebook

I've correclty created a Facebook app, placing the email tag in the user permission, into the Auth Dialog section.

The problem that I can't access to the user mail.. I don't receive this parameter as response, I only receive: last_name, firt_name, birthday and other unnecessary data, I need the email..

I know that it's possible if the user accept the auth dialog conditions, but for what reason I can't retrieve it?

Answers


Assuming the email permission has been granted (a call to /me/permissions will verify this), a call to /me/?fields=email should produce the user's email address.

If that's not happening you'll need to be more clear about what the problem is.


I too faced this problem. We had all required permission on the auth dialog permissions setting. but it will not show up when really use the app.

We used the scope to fix it. Try this

$loginUrl = $facebook->getLoginUrl(array( 'scope'=>'{permission that your app require}'));

For example

$loginUrl = $facebook->getLoginUrl(array( 'scope'=>'email,read_friendlists'));

by addig scope varible the auth dialog will ask for these permission. May be this will help you.


Need Your Help

How to use Vim 7.4 on Mac OS after install it by brew?

macos vim

I have installed vim by brew on the newest Mac OS:

travis-ci — Waiting for status to be reported

github travis-ci

I pushed a new commit to my git repo, but travis-ci build isn't triggered.