Problem hitting immediate rate limit max on iOS with Social Framework - HTTP status 429 - Rate limit exceeded; code: 88


#1

So I’ve read most of the FAQs regarding rate limits and tried to search here (and Stack Overflow) for an answer to this question. I’m hesitant to ask because it seems like others would have run into this immediately. But here goes. Sorry if this is a duplicate question.

Here’s the issue:

In the Xcode simulator, my code works fine, but on a actual device (iPad) I instantly get a rate-limiting error.

Here’s the basic code:

NSURL *url = [NSURL URLWithString:@"https://api.twitter.com/1.1/friends/ids.json"];

NSDictionary *parameters = @{@"screen_name" : account.username};
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:url parameters:parameters];
request.account = account;
[request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
{ .... }

This happens on the first request - after not using the device overnight.

Here’s my log output:

<NSHTTPURLResponse: 0x16e5cf70> { URL: https://api.twitter.com/1.1/friends/ids.json?adc=pad&screen_name=dmcgloin } { status code: 429, headers {
“Content-Encoding” = gzip;
“Content-Length” = 81;
“Content-Type” = “application/json; charset=utf-8”;
Date = “Thu, 22 May 2014 20:32:24 UTC”;
Server = tfe;
“Strict-Transport-Security” = “max-age=631138519”;
“x-rate-limit-limit” = 15;
“x-rate-limit-remaining” = 0;
“x-rate-limit-reset” = 1400791031;
} }

Printing description of error:
Server error status code: 429 ‘client error’ Response: ‘{“errors”:[{“message”:“Rate limit exceeded”,“code”:88}]}’


Update: 429 troubles
#2

I seemed to have resolved the issue, at least temporarily, by deleting the system setting for my Twitter account and signing in again. Seems like the error messaging is somehow broken.