URL-
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'email'
));
you can also add additional permissions, for example
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'email, user_activities '
));
Request permission before you get the login URL.
check permissions with facebook login here
So, you can get the user's email address
$user_profile['email'];
and username
$user_profile['username'];
source
share