summaryrefslogtreecommitdiff
path: root/lib/twitteroauthclient.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-08-06 07:03:05 +0000
committerZach Copley <zach@controlyourself.ca>2009-08-06 07:03:05 +0000
commit421e33f145de0476088f0b802f0b0a9303372b8a (patch)
tree7c0bedd596efb2d19982e5c42f42abce4df41418 /lib/twitteroauthclient.php
parent6d29592ec7a37f907256c18aff4afe9cab74d987 (diff)
- Rewrote SyncTwitterFriends as a daemon
- Made it use OAuth - Code clean up
Diffstat (limited to 'lib/twitteroauthclient.php')
-rw-r--r--lib/twitteroauthclient.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/twitteroauthclient.php b/lib/twitteroauthclient.php
index c5f114fb0..2636a3833 100644
--- a/lib/twitteroauthclient.php
+++ b/lib/twitteroauthclient.php
@@ -58,4 +58,44 @@ class TwitterOAuthClient extends OAuthClient
return $statuses;
}
+ function statuses_friends($id = null, $user_id = null, $screen_name = null,
+ $page = null)
+ {
+ $url = "https://twitter.com/statuses/friends.json";
+
+ $params = array('id' => $id,
+ 'user_id' => $user_id,
+ 'screen_name' => $screen_name,
+ 'page' => $page);
+ $qry = http_build_query($params);
+
+ if (!empty($qry)) {
+ $url .= "?$qry";
+ }
+
+ $response = $this->oAuthGet($url);
+ $ids = json_decode($response);
+ return $ids;
+ }
+
+ function friends_ids($id = null, $user_id = null, $screen_name = null,
+ $page = null)
+ {
+ $url = "https://twitter.com/friends/ids.json";
+
+ $params = array('id' => $id,
+ 'user_id' => $user_id,
+ 'screen_name' => $screen_name,
+ 'page' => $page);
+ $qry = http_build_query($params);
+
+ if (!empty($qry)) {
+ $url .= "?$qry";
+ }
+
+ $response = $this->oAuthGet($url);
+ $ids = json_decode($response);
+ return $ids;
+ }
+
}