Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用facebook api检索电子邮件_Api_Facebook - Fatal编程技术网

无法使用facebook api检索电子邮件

无法使用facebook api检索电子邮件,api,facebook,Api,Facebook,在我的网站上进行用户身份验证后,我试图通过facebook检索用户电子邮件 #*** run fql *** $fql = "select uid, first_name, last_name, name, sex, email, current_location, website, interests, birthday, pic_big from user where uid=me()"; $param = array('method' => 'fql.qu

在我的网站上进行用户身份验证后,我试图通过facebook检索用户电子邮件

#*** run fql ***
   $fql    =   "select uid, first_name, last_name, name, sex, email, current_location, website, interests, birthday, pic_big from user where uid=me()";
   $param  =   array('method' => 'fql.query', 'query' => $fql, 'callback' => '');
   $user   =   $facebook->api($param);print_r($user);
我运行了下面的查询,但电子邮件和生日字段为空;它们对于在我的网站上注册非常重要

#*** run fql ***
   $fql    =   "select uid, first_name, last_name, name, sex, email, current_location, website, interests, birthday, pic_big from user where uid=me()";
   $param  =   array('method' => 'fql.query', 'query' => $fql, 'callback' => '');
   $user   =   $facebook->api($param);print_r($user);

我该怎么办?要访问电子邮件和生日等字段,您需要在授权期间请求额外权限。权限的完整列表可用。

请我查看了它,我似乎不明白如何使用扩展权限,请您提供一个示例,非常感谢您在登录时可以请求权限:$facebook->login('permission1,permission2…')@Ogugua:这是一个不错的教程: