Skip to content

Instantly share code, notes, and snippets.

@aaronbieber
aaronbieber / ttytter.pl
Created October 17, 2013 15:34
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'},