[twitter-dev] Get All Followers Using twitteroauth

2010-09-09 Thread Paulo Fernandes
Hi

I'm beggining in this API and in this group.

I downloaded 0.2.0-beta3 from http://github.com/abraham/twitteroauth

I tryed to get all followers, but only retrieved 100 followers.

How can I get all followers? I saw something about cursor, but I don't
know how can I use it.

Please some help will be useful

Thanks

-- 
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


Re: [twitter-dev] Get All Followers Using twitteroauth

2010-09-09 Thread Abraham Williams
$connection = new TwitterOAuth('consumer_key', 'consumer_secret',
'access_token', 'access_token_secret');
$result100 = $connection-get('statuses/followers', array('cursor' = -1));
$result200 = $connection-get('statuses/followers', array('cursor' =
$result100-next_cursor));

You will be best off writing a loop instead of manually specifying how many
blocks of 100 it pulls in. $result100-users will be an array of users.

Abraham
-
Abraham Williams | Hacker Advocate | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Thu, Sep 9, 2010 at 08:59, Paulo Fernandes paulofernande...@gmail.comwrote:

 Hi

 I'm beggining in this API and in this group.

 I downloaded 0.2.0-beta3 from http://github.com/abraham/twitteroauth

 I tryed to get all followers, but only retrieved 100 followers.

 How can I get all followers? I saw something about cursor, but I don't
 know how can I use it.

 Please some help will be useful

 Thanks

 --
 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


-- 
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