Hey Rick, The cursor isn't a sequential page number so you can't 'page' through the results by incrementing it. Instead you need to use the value we provide in the API response. You can find the cursor for the next page as the 'next_cursor' value. If you use that value you will be able to retrieve all the followers.
The alternative method is to call /followers/ids which gives up to 5000 follower IDs in one request. Then, if you need more information about a follower, you can lookup 100 users details using /users/lookup. More information on these two methods is available on our developer resources site: http://dev.twitter.com/doc/get/followers/ids http://dev.twitter.com/doc/get/users/lookup Hope that helps, Matt On Mon, Aug 30, 2010 at 2:13 PM, Rick <rickstuivenb...@gmail.com> wrote: > My topic subject might be spam-attractive but I didn't had any > insperation for a nicer one. > > I am playing around for 6 weeks with my cursor problem in PHP. I use > the twitteroauth library and I am unable to solve my issue. I hope > somebody can help me solving my cursor problem. > > My current code with error_reporting(E_ALL); returns a couple of > errors. But it seems to not give me any satisfied result I want to (It > only returns the last 100 followers). > > <?php > > // Above the cursor definition I include stuff like twitterOAuth.php > and I have the access tokens etc. I leaved them out of this code for > easyness > > $cursor = -1; > > $followers = $oauth->get('statuses/followers', array('cursor' => > $cursor)); > $totaal = count($followers); > > while($totaal > 1) { > for($x=0; $x<$totaal; $x++) { > // Here I removed the code so you can see the overall code. Inside > this while I get information on who made his last status. I check them > trought $followers[$x]->status->created_at) and $followers[$x]- >>protected) and then I process this information. > } > > $cursor = $followers->next_cursor; > $followers = $oauth->get('statuses/followers', array('cursor' => > $cursor)); > $totaal = count($followers); > > $cursor++; > } > > ?> > > Thats the code. I removed some of the informatiob so you can easy see > my bone code. What am I doing wrong? Should I process $totaal > different? With this code I only get the last 100 followers and not > anything else. > > Thank you for helping me before the basis xAuth ends. > > Regards > > -- > 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?hl=en > -- Matt Harris Developer Advocate, Twitter http://twitter.com/themattharris -- 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?hl=en