Facebook Email field return null (even if the “email” permission is set and accepted)

前端 未结 14 1176
孤街浪徒
孤街浪徒 2020-11-29 01:12

For some users in our application, the email field returns NULL even if the user has granted the email access to the app. When we check the scope parameter and the validity

相关标签:
14条回答
  • 2020-11-29 02:11

    According to the documentation:

    Note, even if you request the email permission it is not guaranteed you will get an email address. For example, if someone signed up for Facebook with a phone number instead of an email address, the email field may be empty.

    That would explain why some users have a null email!

    0 讨论(0)
  • 2020-11-29 02:13

    I have the same issue. It is working fine on my localhost, i am using php SDK for facebook login and when i submit my request it's return all the fields like email,name etc of the user but on server somehow it is not working.It will not returns user email. I have done lots of R&D on that and i have the solution for the issue. :)

    $profile = $facebook->api('/me?fields=email,first_name,last_name');
    

    if you are using php-sdk just passes fields like this it returns the email,first_name etc. Hopes it works for you all. thanks.

    0 讨论(0)
提交回复
热议问题