1

I have some tweet id. I want to get retweeters of this tweet. Therefore, I use this api: https://dev.twitter.com/rest/reference/get/statuses/retweeters/ids.

There is a example of code written with help python 3 and TwitterAPI:

credentials = "credentials.txt"
o = TwitterOAuth.read_file(credentials)
api = TwitterAPI(o.consumer_key, o.consumer_secret, auth_type='oAuth2')

data = api.request('statuses/retweeters/ids', {'id': "370134917713494016", 'count': 100})

My result is:

{"ids":[id1,id2,..id100],"next_cursor":0,"next_cursor_str":"0","previous_cursor":0,"previous_cursor_str":"0"}

I don't understand, why my cursors are null.

Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52
Denis
  • 3,595
  • 12
  • 52
  • 86

1 Answers1

2

That's how the API for retweeters works.

While this method supports the cursor parameter, the entire result set can be returned in a single cursored collection. Using the count parameter with this method will not provide segmented cursors for use with this parameter.

You can only get a maximum of 100 users out of it. So there's no need for a cursor.

Terence Eden
  • 14,034
  • 3
  • 48
  • 89
  • so, why twitter returns zero cursor? – Denis Apr 07 '15 at 12:13
  • Cursors are used to move between pages of results. You have all the results. Therefore, the cursor is 0. There are no more results. – Terence Eden Apr 08 '15 at 09:11
  • I am sorry, but why you give me `GET statuses/retweets/:id`? My question is about `GET statuses/retweeters/ids`. – Denis Apr 08 '15 at 11:29
  • Sorry @Denis, I've updated my answer with the correct link & text. The answer is still the same though - you can only get a maximum of 100 IDs out of the API. – Terence Eden Apr 08 '15 at 11:47
  • it is okey. But this limit is doing me sad. – Denis Apr 08 '15 at 11:55
  • @TerenceEden But shouldn't there be more pages with max 100 each? The documentation says "Causes the list of IDs to be broken into pages of no more than 100 IDs at a time." – Robin Alexander Jul 17 '18 at 11:37
  • @vloryan this answer is 3 years old - the API may have changed in that time. Please open a new question. – Terence Eden Jul 18 '18 at 13:29