我正在使用最新版本的PHP SDK for Facebook(3.2.1)
我想知道,当使用base_facebook.phpsdk中提供的功能注销时,是否有办法阻止它实际退出facebook,但仍然删除网站应用程序的会话?
以下是退出功能 base_facebook.php
/**
* Get a Logout URL suitable for use with redirects.
*
* The parameters:
* - next: the url to go to after a successful logout
*
* @param array $params Provide custom parameters
* @return string The URL for the logout flow
*/
public function getLogoutUrl($params=array()) {
session_destroy();
return $this->getUrl(
'www',
'logout.php',
array_merge(array(
'next' => $this->getCurrentUrl(),
'access_token' => $this->getUserAccessToken(),
), $params)
);
}
Run Code Online (Sandbox Code Playgroud)
然后我的注销网址是:$logoutUrl = $facebook->getLogoutUrl();然后显然使用锚标记注销:<a …