Facebook get email not working
I have this piece of code:
require_once("orryon/php/facebook.php");
$config = array();
$config['appId'] = '199217106922527';
$config['secret'] = 'f4edc8f9ec7c7e53590b45f8ae51ad60';
$facebook = new Facebook($config);
$uid = $facebook->getUser();
if(!empty($uid)){
$fbmail = $facebook->api('/me');
}
And I try to get the email with this line:
echo $fbmail['email'];
However, this won't work. If I use "name" instead of "email" it works
fine... The email permission is set, so what is wrong?
No comments:
Post a Comment