More tinkering with logout. I think I got it this time! It's been driving me crazy.

This commit is contained in:
Zach Copley 2009-07-16 00:47:48 +00:00
parent 4e7546fbe2
commit b842b34a57

View File

@ -122,7 +122,9 @@ class FBConnectPlugin extends Plugin
FB_RequireFeatures( FB_RequireFeatures(
["XFBML"], ["XFBML"],
function() { function() {
FB.Facebook.init("%s", "../xd_receiver.html"); FB.init("%s", "../xd_receiver.html",
{"doNotUseCachedConnectState":true });
} }
); } ); }
@ -220,11 +222,11 @@ class FBConnectPlugin extends Plugin
try { try {
$facebook = getFacebook(); $facebook = getFacebook();
$fbuid = getFacebook()->get_loggedin_user(); $fbuid = $facebook->api_client->users_getLoggedInUser();
} catch (Exception $e) { } catch (Exception $e) {
common_log(LOG_WARNING, common_log(LOG_WARNING,
'Problem getting Facebook client: ' . 'Problem getting Facebook user: ' .
$e->getMessage()); $e->getMessage());
} }
@ -297,9 +299,9 @@ class FBConnectPlugin extends Plugin
$title = _('Logout from the site'); $title = _('Logout from the site');
$text = _('Logout'); $text = _('Logout');
$html = sprintf('<li id="nav_logout"><a href="%s" title="%s" ' . $html = sprintf('<li id="nav_logout"><a href="#" title="%s" ' .
'onclick="FB.Connect.logout(function() { goto_logout() })">%s</a></li>', 'onclick="FB.Connect.logoutAndRedirect(\'%s\');">%s</a></li>',
$logout_url, $title, $text); $title, $logout_url, $text);
$action->raw($html); $action->raw($html);