greptweet icon indicating copy to clipboard operation
greptweet copied to clipboard

An error message when we hit Twitter's ratelimit

Open ghost opened this issue 12 years ago • 3 comments

It looks like from this I hit some sort of rate limit.

It also spat out PHP errors

screen_name=edanhewitt&count=200&page=1&include_rts=1&trim_user=0
HTTP/1.1 429 Too Many Requests
content-length: 56
content-type: application/json; charset=utf-8
date: Tue, 02 Jul 2013 22:29:46 UTC
server: tfe
set-cookie: guest_id=v1%3A137280418679958243; Domain=.twitter.com; Path=/; Expires=Thu, 02-Jul-2015 22:29:46 UTC
strict-transport-security: max-age=631138519
x-rate-limit-limit: 180
x-rate-limit-remaining: 0
x-rate-limit-reset: 1372804208

PHP Fatal error:  Cannot use object of type stdClass as array in /srv/www/greptweet.com/json-to-text.php on line 6
edanhewitt saved 0 tweets
removed `edanhewitt.quug'
removed `edanhewitt.LnJV'
removed directory: `lock'

Tried to download, got this:

http://f.cl.ly/items/340s0s1I2z420P3G1d2z/Image%202013-07-02%20at%2011.30.45%20PM.png

[404]

ghost avatar Jul 02 '13 22:07 ghost

We are limited to 180. It gets reset after 15min IIUC. Not sure how we get the larger 300.

Admittedly the error message sucks there. That should be fixed too! Thanks for reporting this.

kaihendry avatar Jul 03 '13 00:07 kaihendry

We should be using "application-only authentication" https://dev.twitter.com/discussions/19338

kaihendry avatar Jul 14 '13 11:07 kaihendry

Ok, I've implemented "application-only authentication" @JamieKitson

Though now I need to do a nicer error message.

kaihendry avatar Jul 14 '13 12:07 kaihendry