summaryrefslogtreecommitdiff
path: root/plugins/FBConnect/FBConnectPlugin.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-07-16 14:46:24 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-07-16 14:46:24 +0000
commit98fc37b03b0e8a707a223395aaa8029262c0f086 (patch)
treecf8829aefa3de0d79acb5259a9459d9cd03092a1 /plugins/FBConnect/FBConnectPlugin.php
parentc256dddd02bbd4e2f892a4f4798be5292d1c1630 (diff)
parent87a9fe6013137e95aad5f4fbb83a9b5d76543e26 (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
Diffstat (limited to 'plugins/FBConnect/FBConnectPlugin.php')
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 65870a187..2e32ad198 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -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);