Skip to content

Instantly share code, notes, and snippets.

@aaronbieber
Created October 17, 2013 15:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronbieber/7027104 to your computer and use it in GitHub Desktop.
Save aaronbieber/7027104 to your computer and use it in GitHub Desktop.
Fix the "rate limit rate failure" error in TTYtter. Users repeatedly receiving the error "-- rate limit rate failure: using 180 second fallback" can fix the issue by adding backslashes to the keys in the `$rate_limit_ref` hash. Previously no values were being returned, which resulted in a calculated rate limit of zero, hence the fallback. Find t…
$rate_limit_left = &min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/home_timeline'}->{'remaining'},
&min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/mentions_timeline'}->{'remaining'},
0+$rate_limit_ref->{'resources'}->{'search'}->{'\/search\/tweets'}->{'remaining'}));
$rate_limit_rate = &min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/home_timeline'}->{'limit'},
&min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/mentions_timeline'}->{'limit'},
0+$rate_limit_ref->{'resources'}->{'search'}->{'\/search\/tweets'}->{'limit'}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment