How to get fb user email using new php sdk

I asked for extended permission for the user's primary email address. but I can not find user email from decoded fb signed_request. how to receive email from the new php sdk after the user provides extended permission for the email address?

+4
source share
1 answer

You should use something like:

$facebook->api('/me?fields=email'); 

And the result:

 Array ( [email] => XXXXXXXXXXXXXXX [id] => 579187142 ) 

IMPORTANT NOTE: Facebook gives the user a choice NOT to provide your application with real email! therefore you must be careful about this!

+9
source

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


All Articles