0

I'm seeing some strange behavior regarding Twitter rate limits. When I run the following code in my rails app (in an action in a controller), I often get the error:

Twitter::Error::TooManyRequests.

However, if I run the same code in the rails console, I have no problems and can make as many requests to Twitter as I want.

App code:

Twitter.mentions(count: 200, since_id: maximum(:tweet_id))

Rails console code:

Twitter.mentions(count: 200)

Why aren't the rate limits the same?

I'm using version 4.7.0 of the Twitter gem.

As an aside, I also notice that I get a different number of returned Tweets. I'm assuming that this is due to the same reason.

readyornot
  • 2,783
  • 2
  • 19
  • 31
  • It may be because the console isn't reporting the error. – muttonlamb Jun 14 '13 at 03:31
  • Unless you are using different credentials or different IPs there should be no difference in the rate limit if you are using console or server. Twitter is limiting by time as well https://dev.twitter.com/docs/rate-limiting/1.1. Can it be a coincident? – iltempo Jun 15 '13 at 15:49

0 Answers0