几个月前,这种情况没有发生,但是现在,每次我尝试登录Web应用程序时,Facebook都会询问我有关页面(manage_pages)的权限,如果我事先接受了这些权限,则是独立的。
在我拥有的Facebook api仪表板中,这些权限是:电子邮件,manage_pages,默认值和user_friends:
Capture of permissions in the app
当我通过php-sdk调用api时:
public function getLoginUrl($scope = array(), $version = null)
{
$scope=array('email','public_profile','user_friends','manage_pages');
$version = ($version ?: FacebookRequest::GRAPH_API_VERSION);
$this->state = $this->random(16);
$this->storeState($this->state);
$params = array(
'client_id' => $this->appId,
'redirect_uri' => $this->redirectUrl,
'state' => $this->state,
'sdk' => 'php-sdk-' . FacebookRequest::VERSION,
'scope' => implode(',', $scope)
);
return 'https://facebook.com/' . $version . '/dialog/oauth?' .
http_build_query($params, null, '&');
}
我感到奇怪的是,如果我不请求manage_page,则不会发生这种情况,并且无需通过对话窗口即可登录