[英]Facebook Open Graph not returning field
我正在同时使用PHP SDK和Javascript SDK在我的网站上进行登录(工作正常)。
我的应用仅授权获取基本信息以及您在此屏幕中看到的电子邮件
但是,当我使用以下命令调用信息时:
$user_profile = $facebook->api('/me','GET');
//$user_profile[] needs name etc to insert into DB
$fname = $user_profile['first_name'];
$lname = $user_profile['last_name'];
$email = $user_profile['email'];
我得到除电子邮件之外的所有内容。
不得不在我的参数中更新范围。 好像您在两个地方都需要它。
$params = array(
'scope' => 'read_stream, friends_likes, email',
'redirect_uri' => 'http://www.#######.com'
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.