diff options
author | Brion Vibber <brion@pobox.com> | 2010-04-14 15:58:42 +0200 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-04-14 15:58:42 +0200 |
commit | c95bff77446f7ce3454ef62b0c22e298de1d3e69 (patch) | |
tree | 817507654fd75c12efe5926812f61375a50a1338 /plugins/TwitterBridge/twitteroauthclient.php | |
parent | 3da50c19dfff7645dc46f1b836ebf4ecda726129 (diff) | |
parent | efcdfabc1225a2fdcb37a6cc3c96982b24b88d8f (diff) |
Merge branch 'master' into testing
Diffstat (limited to 'plugins/TwitterBridge/twitteroauthclient.php')
-rw-r--r-- | plugins/TwitterBridge/twitteroauthclient.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/TwitterBridge/twitteroauthclient.php b/plugins/TwitterBridge/twitteroauthclient.php index 93f6aadd1..d895d8c73 100644 --- a/plugins/TwitterBridge/twitteroauthclient.php +++ b/plugins/TwitterBridge/twitteroauthclient.php @@ -166,17 +166,22 @@ class TwitterOAuthClient extends OAuthClient /** * Calls Twitter's /statuses/update API method * - * @param string $status text of the status - * @param int $in_reply_to_status_id optional id of the status it's - * a reply to + * @param string $status text of the status + * @param mixed $params optional other parameters to pass to Twitter, + * as defined. For back-compatibility, if an int + * is passed we'll consider it a reply-to ID. * * @return mixed the status */ - function statusesUpdate($status, $in_reply_to_status_id = null) + function statusesUpdate($status, $params=array()) { $url = 'https://twitter.com/statuses/update.json'; - $params = array('status' => $status, - 'in_reply_to_status_id' => $in_reply_to_status_id); + if (is_numeric($params)) { + $params = array('in_reply_to_status_id' => intval($params)); + } + $params['status'] = $status; + // We don't have to pass 'source' as the oauth key is tied to an app. + $response = $this->oAuthPost($url, $params); $status = json_decode($response); return $status; |