better param handling in hometimeline
This commit is contained in:
parent
865075e648
commit
76f42ba83f
@ -202,12 +202,23 @@ class TwitterOAuthClient extends OAuthClient
|
|||||||
{
|
{
|
||||||
|
|
||||||
$url = 'https://twitter.com/statuses/home_timeline.json';
|
$url = 'https://twitter.com/statuses/home_timeline.json';
|
||||||
$params = array('since_id' => $since_id,
|
|
||||||
'max_id' => $max_id,
|
$params = array('include_entities' => 'true');
|
||||||
'count' => $cnt,
|
|
||||||
'page' => $page,
|
if (!empty($since_id)) {
|
||||||
'include_entities' => 1);
|
$params['since_id'] = $since_id;
|
||||||
$qry = http_build_query($params);
|
}
|
||||||
|
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)) {
|
if (!empty($qry)) {
|
||||||
$url .= "?$qry";
|
$url .= "?$qry";
|
||||||
|
Loading…
Reference in New Issue
Block a user