diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-08-04 02:21:18 +0000 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-24 11:53:43 -0400 |
commit | fd9d653eb3794c491ff162e165b51ad36762d55d (patch) | |
tree | 0d2d30a159c5a52caca16e5e775791ab3e353251 /lib/twitteroauthclient.php | |
parent | ee006dbb0eb8e9d59e5d7b0083918521646102a0 (diff) |
Make TwitterStatusFetcher daemon work with OAuth
Diffstat (limited to 'lib/twitteroauthclient.php')
-rw-r--r-- | lib/twitteroauthclient.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/twitteroauthclient.php b/lib/twitteroauthclient.php index e1190f167..aabda8d6a 100644 --- a/lib/twitteroauthclient.php +++ b/lib/twitteroauthclient.php @@ -39,4 +39,23 @@ class TwitterOAuthClient extends OAuthClient return $status; } + function statuses_friends_timeline($since_id = null, $max_id = null, + $cnt = null, $page = null) { + + $url = 'http://twitter.com/statuses/friends_timeline.json'; + $params = array('since_id' => $since_id, + 'max_id' => $max_id, + 'count' => $cnt, + 'page' => $page); + $qry = http_build_query($params); + + if (!empty($qry)) { + $url .= "?$qry"; + } + + $response = $this->oAuthGet($url); + $statuses = json_decode($response); + return $statuses; + } + } |