开发者

Email scope problem / email address isn't sent in /me request

I'm using PHP SDK 3.1 and I have a problem with retrieving email from /me request. My scope looks like:

protected $scope = 'email,offline_access,publish_stream,user_birthday,user_location,user_work_history,user_about_me,user_hometown';

and I'm getting url by:

$this->fb->getLoginUrl(array('scope' => $this->scope));

where $this->fb is an Faceboo开发者_开发知识库k instance.

Problem is when i call

$userProfile = $this->fb->api('/me');

Variable $userProfile contains a lot of data but there is no email. Few days ago it worked but somehow it stopped.

What should i do to get email?

Thanks in advice.


I'm using same kit and the following, works just fine. user_about_me should not be necessary.

$loginUrl = $facebook->getLoginUrl( array('scope' => 'user_about_me,email' ) );

Nota : If you did not give the rights upfront, try re-authorizing the app for the user.


$this->fb->getLoginUrl(array('req_perms' => 'email'))

should work but remember that you can only get the connected user email and not his friends emails

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜