php - Retrieving all twitter followers with a single request -


i tried , added cursor still retrieve first 100 followers.

<?php $cursor = -1; $account_from = 'username';   {      $json = file_get_contents('http://api.twitter.com/1/statuses/followers/' .   $account_from .'.json?cursor=' . $cursor);  $accounts = json_decode($json);  foreach ($accounts->users $account) {          $a[] = $account->screen_name ;    } $cursor = $accounts->next_cursor;   }  while ($cursor > 0);   foreach($a $f) {           echo $f ;      }   ?> 

is there better , simpler way of doing it? going wrong? please?

api docs state request deprecated:

this method deprecated return information users have tweeted recently. not functional way retrieve of users followers. instead of using method use combination of followers/ids , users/lookup.


Comments