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
@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.
Some possible reasons:
Check: https://developers.facebook.com/bugs/298946933534016
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.
Just you need to add more permissions to whatever data you want from Facebook object about your user
facebook api
You must give email permission along with the auth button.
authButton.setReadPermissions(Arrays.asList("email"));
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.
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).