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

前端 未结 14 1177
孤街浪徒
孤街浪徒 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:01

    @ozba solution is not applicable because facebook now shows an alert message when user has an unconfirmed email address. So, if you're having this problem it's more liking that the user had signed up using phone number. Message when trying to access email

    Some possible reasons:

    • No Email address on account (only phone number)
    • No confirmed email address on account
    • User entered a security checkpoint which required them to reconfirm their email address and they have not yet done so users's email address is unreachable.

    Check: https://developers.facebook.com/bugs/298946933534016

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

    Facebook does not send the email if the user has logged in with their phone number. View the comments on https://github.com/mkdynamic/omniauth-facebook/issues/61 for more info.

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

    Just you need to add more permissions to whatever data you want from Facebook object about your user

    facebook api

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

    You must give email permission along with the auth button.

    authButton.setReadPermissions(Arrays.asList("email"));
    
    0 讨论(0)
  • 2020-11-29 02:07

    Facebook will provide you a user's email id if and only that user has a confirmed email id associated with his account. If your app can retrieve email id for some users, problem may not with the Developer.

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

    I had the same problem and I think I found out why: If the user has an unconfirmed email in Facebook (i.e. Facebook sent him a validation mail to the user's email address but he didn't respond) Facebook WILL NOT pass that email to your app even if he gave you the email permissions.

    So what I did is use his or her Facebook email if the user has a user name (i.e. userName@facebook.com).

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