What do you mean by "populate friend"? It looks like your code should mostly work. One issue is the while loop will never end because next_cursor returns 0 when there are no more results which is greater then -1.
Abraham ------------- Abraham Williams | Hacker Advocate | abrah.am @abraham <https://twitter.com/abraham> | github.com/abraham | blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. On Thu, Dec 2, 2010 at 00:50, putri <handayani.put...@gmail.com> wrote: > dear friend, > > need helpp, :)... im nubiiee in here > i want get all friend list, and i confuse how to pupulate friend from > paging.. > > this my code: > > $cursor = -1; > if($cursor == -1 ){ > $followers = $connection->get('statuses/friends', > array('id' => > $getUserId[0] ,'cursor' =>$cursor)); > } > > do > { > $cursornya .= $followers->next_cursor.","; > $followers2 = $connection->get('statuses/friends', > array('id' => > $getUserId[0] ,'cursor' => $followers->next_cursor)); > > echo "something"; > > }while($followers->next_cursor > -1 ); > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk