TwitterBridge is closer to working again

This commit is contained in:
Mikael Nordfeldth
2015-07-17 21:03:37 +02:00
parent 6cd7a4a400
commit e10d081a56
5 changed files with 61 additions and 67 deletions

View File

@@ -512,16 +512,15 @@ class TwitterBridgePlugin extends Plugin
{
$fuser = null;
$flink = Foreign_link::getByUserID($profile->id, TWITTER_SERVICE);
if (!empty($flink)) {
try {
$flink = Foreign_link::getByUserID($profile->id, TWITTER_SERVICE);
$fuser = $flink->getForeignUser();
if (!empty($fuser)) {
$links[] = array("href" => $fuser->uri,
"text" => sprintf(_("@%s on Twitter"), $fuser->nickname),
"image" => $this->path("icons/twitter-bird-white-on-blue.png"));
}
$links[] = array("href" => $fuser->uri,
"text" => sprintf(_("@%s on Twitter"), $fuser->nickname),
"image" => $this->path("icons/twitter-bird-white-on-blue.png"));
} catch (NoResultException $e) {
// no foreign link for Twitter on this profile ID
}
return true;