1

I am attempting to get a list of favorited tweets made by a specific user. Their twitter account indicates that they have favorited nearly 20k tweets but the list of favorites being returned through the API is only ~2,300 favorited tweets. Below is a sample of my python code:

api = tweepy.API(auth)
test_user = "someuser"

#print out each favorited tweet
for page in tweepy.Cursor(api.favorites,id=test_user,wait_on_rate_limit=True, 
  count=200).pages(200):

  for status in page:
    print status.user.screen_name.encode('utf-8') + ": " 
      + status.text.encode('utf-8')

I assumed that the count = 200 and pages = 200 would give me 40,000 tweets max. Am I missing something?

1 Answer 1

0

From a bit more digging on the twitter API, it looks like there is a cap on the number of tweets we can query. See this question from the twitter developer forum.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.