]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
More tinkering with logout. I think I got it this time! It's been driving me crazy.
authorZach Copley <zach@controlyourself.ca>
Thu, 16 Jul 2009 00:47:48 +0000 (00:47 +0000)
committerZach Copley <zach@controlyourself.ca>
Sat, 8 Aug 2009 00:56:51 +0000 (00:56 +0000)
plugins/FBConnect/FBConnectPlugin.php

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