Skip to content
Browse files

Merge pull request #9 from MyPlay/master

getUserFollows() now with the cursor param to paginate results
  • Loading branch information...
2 parents 82302a1 + 99fff8c commit b27b368be0d6557788eb100d2a122f0c98af50fd @macuenca committed Sep 23, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 Instagram.php
View
7 Instagram.php
@@ -38,7 +38,7 @@ class Instagram {
'user_feed' => 'https://api.instagram.com/v1/users/self/feed?%s',
'user_recent' => 'https://api.instagram.com/v1/users/%s/media/recent/?access_token=%s&max_id=%s&min_id=%s&max_timestamp=%s&min_timestamp=%s',
'user_search' => 'https://api.instagram.com/v1/users/search?q=%s&access_token=%s',
- 'user_follows' => 'https://api.instagram.com/v1/users/%d/follows?access_token=%s',
+ 'user_follows' => 'https://api.instagram.com/v1/users/%d/follows?access_token=%s&cursor=%s',
'user_followed_by' => 'https://api.instagram.com/v1/users/%d/followed-by?access_token=%s',
'user_requested_by' => 'https://api.instagram.com/v1/users/self/requested-by?access_token=%s',
'user_relationship' => 'https://api.instagram.com/v1/users/%d/relationship?access_token=%s',
@@ -265,9 +265,10 @@ public function searchUser($name) {
/**
* Get the list of users this user follows.
* @param integer $id. The user id
+ * @param integer $cursor. Cursor to paginate results
*/
- public function getUserFollows($id) {
- $endpointUrl = sprintf($this->_endpointUrls['user_follows'], $id, $this->getAccessToken());
+ public function getUserFollows($id, $cursor = '') {
+ $endpointUrl = sprintf($this->_endpointUrls['user_follows'], $id, $this->getAccessToken(), $cursor);
$this->_initHttpClient($endpointUrl);
return $this->_getHttpClientResponse();
}

0 comments on commit b27b368

Please sign in to comment.
Something went wrong with that request. Please try again.