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

Reply via email to