diff options
author | Evan Prodromou <evan@status.net> | 2010-09-05 01:40:15 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-07 04:00:59 -0400 |
commit | a844aaaea6e9ec603bd4a070cfa62ae610993e58 (patch) | |
tree | 9a0d4427e63a5648119518e4013448d3845dc50d | |
parent | 86d37ba59cd0cbc418d246f79d027ae92e4db157 (diff) |
better param handling in hometimeline
-rw-r--r-- | plugins/TwitterBridge/twitteroauthclient.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/plugins/TwitterBridge/twitteroauthclient.php b/plugins/TwitterBridge/twitteroauthclient.php index 0d27e5990..5d10d8f71 100644 --- a/plugins/TwitterBridge/twitteroauthclient.php +++ b/plugins/TwitterBridge/twitteroauthclient.php @@ -202,12 +202,23 @@ class TwitterOAuthClient extends OAuthClient { $url = 'https://twitter.com/statuses/home_timeline.json'; - $params = array('since_id' => $since_id, - 'max_id' => $max_id, - 'count' => $cnt, - 'page' => $page, - 'include_entities' => 1); - $qry = http_build_query($params); + + $params = array('include_entities' => 'true'); + + if (!empty($since_id)) { + $params['since_id'] = $since_id; + } + if (!empty($max_id)) { + $params['max_id'] = $max_id; + } + if (!empty($cnt)) { + $params['count'] = $cnt; + } + if (!empty($page)) { + $params['page'] = $page; + } + + $qry = http_build_query($params); if (!empty($qry)) { $url .= "?$qry"; |