From efcdfabc1225a2fdcb37a6cc3c96982b24b88d8f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 14 Apr 2010 15:45:00 +0200 Subject: Ticket #2205: pass geo locations over Twitter bridge (will only be used if enabled on the Twitter side) --- plugins/TwitterBridge/twitterbasicauthclient.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'plugins/TwitterBridge/twitterbasicauthclient.php') diff --git a/plugins/TwitterBridge/twitterbasicauthclient.php b/plugins/TwitterBridge/twitterbasicauthclient.php index fd26293f9..2c18c9469 100644 --- a/plugins/TwitterBridge/twitterbasicauthclient.php +++ b/plugins/TwitterBridge/twitterbasicauthclient.php @@ -76,18 +76,21 @@ class TwitterBasicAuthClient /** * 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) { $url = 'https://twitter.com/statuses/update.json'; - $params = array('status' => $status, - 'source' => common_config('integration', 'source'), - '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; + $params['source'] = common_config('integration', 'source'); $response = $this->httpRequest($url, $params); $status = json_decode($response); return $status; -- cgit v1.2.3-54-g00ecf