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
You need one more permission from facebook.
include (about_me) permission to the facebook dev setting and also in your app or code..
you can try this it will work String email = user.getProperty("email").toString(); String safeEmail = user.asMap().get("email").toString();
In some cases Facebook may not have a valid email address for a user:
email: string containing a valid RFC822 email address - note: this field may be null if no email address is available for the user
see https://developers.facebook.com/docs/reference/api/user/
I have read previous responses but though some of them true like if the user has not email confirmed but a mobile phone number, many times this error happens for ignoring how to request the information using FB api graph. Let's say your login was successfully done, and you now have an access token and user id an so on but still, cannot see email and other fields you are interested in. Go ahead using this request after confirming login status as connected:
FB.api(
'/me',
'GET',
{"fields":"id,name,birthday,email,about,cover"},
function(response) {
// Insert your code here
}
);
depends on permissions you requested you now will be able to catch further information according to your needs.
$loginUrl = $facebook->getLoginUrl(
array(
'req_perms' => 'email'
)
);
All you need to know:
1) Link 1
Some possible reasons:
No Email address on account
No confirmed email address on account
No verified 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
You also need the 'email' extended permission, even for users who have a valid, confirmed, reachable email address on file.
2) Link 2
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.