You've almost got it right -- in your second request, your params should include cursor=1370145116766924316 -- cursor=-1 needn't be included, as -1 is the value for cursor in the first step, and then you adjust cursor for each subsequent request. The response tells you what your *next* cursor= value should be, not the name of key/value pair to include.
So step 1: https://api.twitter.com/1/followers/ids.json?screen_name=ev&cursor=-1 And step 2: https://api.twitter.com/1/followers/ids.json?screen_name=ev&cursor=1370145116766924316 And so on. @episod <http://twitter.com/episod> - Taylor Singletary On Thu, Jun 2, 2011 at 1:53 PM, Correa Denzil <[email protected]> wrote: > Taylor : > > Thanks for the response. I make the calls in JSON. Here's how I make > the calls. The first call is for : > https://api.twitter.com/1/followers/ids.json?screen_name=ev&cursor=-1 > > This call returns with "next_cursor_str":"1370145116766924316" > > I make the next cursor call as : > > > https://api.twitter.com/1/followers/ids.json?screen_name=ev&cursor=-1&next_cursor=1370145116766924316 > > Is this correct? If that's the case, each of these calls return a > 'ids' list which consist of the list of followers (5000 per call). I > see that the ids are overlapping on each call which shouldn't happen > ideally. > > --Regards, > Denzil > > > > > On Fri, Jun 3, 2011 at 2:06 AM, Taylor Singletary > <[email protected]> wrote: > > Hi Correa, > > I can't reproduce this issue -- can you share which account you're using > to > > test this? Is it an account with more than 5000 followers? > > For example, I tried making these requests for @ev, who has 1.3M+ > followers. > > The first request with cursor=-1 begins with 309873322 and ends > > with 107800155. > > The second request with cursor=1370144140325967611 begins with 307280112 > and > > ends with 301233284 > > Make sure that you're using cursor_str instead of "cursor" from the > response > > of these methods if you're making the requests in languages like > Javascript > > where the act of consuming the Integer representation truncates/malforms > the > > integer. Malformed cursors may be the cause of your duplicated data. > > @episod - Taylor Singletary > > > > > > On Thu, Jun 2, 2011 at 1:11 PM, Correa Denzil <[email protected]> wrote: > >> > >> Hi all, > >> > >> The Twitter API mentions that in order to retrieve more than 5000 user > >> followers one must set the cursor = -1 and use the next_cursor_str and > >> previous_cursor_str options to paginate over the results. > >> > >> However, I observe that I am retrieved similar results(follower ids) > >> on each pagination call. The API suggests that "Querying without the > >> cursor parameter is deprecated and should be avoided." > >> > >> https://dev.twitter.com/doc/get/followers/ids > >> > >> --Regards, > >> Denzil > >> > >> -- > >> Twitter developer documentation and resources: > https://dev.twitter.com/doc > >> API updates via Twitter: https://twitter.com/twitterapi > >> Issues/Enhancements Tracker: > >> https://code.google.com/p/twitter-api/issues/list > >> Change your membership to this group: > >> https://groups.google.com/forum/#!forum/twitter-development-talk > > > > -- > > Twitter developer documentation and resources: > https://dev.twitter.com/doc > > API updates via Twitter: https://twitter.com/twitterapi > > Issues/Enhancements Tracker: > > https://code.google.com/p/twitter-api/issues/list > > Change your membership to this group: > > https://groups.google.com/forum/#!forum/twitter-development-talk > > > > -- > Twitter developer documentation and resources: https://dev.twitter.com/doc > API updates via Twitter: https://twitter.com/twitterapi > Issues/Enhancements Tracker: > https://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > https://groups.google.com/forum/#!forum/twitter-development-talk > -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk
