summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@status.net>2010-11-19 15:53:29 -0800
committerBrion Vibber <brion@status.net>2010-11-19 15:53:29 -0800
commit37994e3ff124fa2456c7dcf59970ca97d8db83ff (patch)
treecdb69c77b16518affe2bc37797c8be36736f7b5e /plugins
parent0dcfcbd51732bdb73368461cc3cd5d9898de5484 (diff)
parent94f2f96f2ebe8d7b127ec643f84cbfb20f4bb475 (diff)
Merge branch 'master' into 0.9.x
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TwitterBridge/TwitterBridgePlugin.php30
1 files changed, 21 insertions, 9 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php
index f5c361250..b2dce6f1c 100644
--- a/plugins/TwitterBridge/TwitterBridgePlugin.php
+++ b/plugins/TwitterBridge/TwitterBridgePlugin.php
@@ -438,10 +438,14 @@ class TwitterBridgePlugin extends Plugin
return true;
}
- $token = TwitterOAuthClient::unpackToken($flink->credentials);
- $client = new TwitterOAuthClient($token->key, $token->secret);
+ try {
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
- $client->statusesDestroy($n2s->status_id);
+ $client->statusesDestroy($n2s->status_id);
+ } catch (Exception $e) {
+ common_log(LOG_ERR, "Error attempting to delete bridged notice from Twitter: " . $e->getMessage());
+ }
$n2s->delete();
}
@@ -475,10 +479,14 @@ class TwitterBridgePlugin extends Plugin
return true;
}
- $token = TwitterOAuthClient::unpackToken($flink->credentials);
- $client = new TwitterOAuthClient($token->key, $token->secret);
+ try {
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
- $client->favoritesCreate($status_id);
+ $client->favoritesCreate($status_id);
+ } catch (Exception $e) {
+ common_log(LOG_ERR, "Error attempting to favorite bridged notice on Twitter: " . $e->getMessage());
+ }
return true;
}
@@ -511,10 +519,14 @@ class TwitterBridgePlugin extends Plugin
return true;
}
- $token = TwitterOAuthClient::unpackToken($flink->credentials);
- $client = new TwitterOAuthClient($token->key, $token->secret);
+ try {
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
- $client->favoritesDestroy($status_id);
+ $client->favoritesDestroy($status_id);
+ } catch (Exception $e) {
+ common_log(LOG_ERR, "Error attempting to unfavorite bridged notice on Twitter: " . $e->getMessage());
+ }
return true;
}