Only use FB's Javascript logout, not its PHP method too
This commit is contained in:
parent
dfb4ed5265
commit
e00f433314
|
@ -287,23 +287,13 @@ class FBConnectPlugin extends Plugin
|
||||||
|
|
||||||
function onStartLogout($action)
|
function onStartLogout($action)
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
|
||||||
|
|
||||||
$flink = Foreign_link::getByUserId($user->id, FACEBOOK_CONNECT_SERVICE);
|
|
||||||
|
|
||||||
$action->logout();
|
$action->logout();
|
||||||
|
$fbuid = $this->loggedIn();
|
||||||
|
|
||||||
if ($flink) {
|
if (!empty($fbuid)) {
|
||||||
|
|
||||||
$facebook = getFacebook();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$fbuid = $facebook->get_loggedin_user();
|
$facebook = getFacebook();
|
||||||
|
$facebook->expire_session();
|
||||||
if ($fbuid > 0) {
|
|
||||||
$facebook->logout(common_local_url('public'));
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
common_log(LOG_WARNING, 'Could\'t logout of Facebook: ' .
|
common_log(LOG_WARNING, 'Could\'t logout of Facebook: ' .
|
||||||
$e->getMessage());
|
$e->getMessage());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user