Is it safe to store the cursor for friend/followers to get the newest entries since last query?


#1

When fetching either friends or followers, is the cursor consistent between API calls? What I mean is that if I cursor through all of the followers, can I use the previous cursor from the last call to get that same chunk of followers again? Hopefully the following example help explain what I mean:

1st set of api calls:
GET https://api.twitter.com/1.1/followers/ids.json?screen_name=theSeanCook

{
    "ids": [
        385752029, 
        602890434, 
        ...
        333181469, 
        333165023
    ], 
    "next_cursor": 1374004777531007833, 
    "next_cursor_str": "1374004777531007833", 
    "previous_cursor": 0, 
    "previous_cursor_str": "0"
}

GET https://api.twitter.com/1.1/followers/ids.json?screen_name=theSeanCook&cursor=1374004777531007833

{
    "ids": [
        73635015, 
        61175149, 
        ...
        18300955, 
        32684766
    ], 
    "next_cursor": 0, 
    "next_cursor_str": "0", 
    "previous_cursor": -1323886329961827926, 
    "previous_cursor_str": "-1323886329961827926"
}

If I store the previous_cursor and then in X amount of time (assuming the user has not added any followers) hit the same URL again am I guaranteed to get the same set of followers back?

If this is not guaranteed is there an easy way to get the a users list of followers today and then get only the new list of followers tomorrow or do i have to iterate over all of the followers again in order to get the difference between yesterday and today?


#2

Hi, I posted a related question and the API guys gave me this response (link), I hope this helps!

https://dev.twitter.com/discussions/14704


#3

I have the same question, but the link in the answer doesn’t work anymore. Is there an update?

Also, if I save a cursor but a user gets a new follower, is the cursor no longer valid? Do I then have to start again and reload all followers?