Hi,
I got client error (429) as mentioned in the link below it’s related to API rate limits:
https://dev.twitter.com/rest/public/rate-limiting
I waited for more than 15 minute and still I’m getting the same error!
This is my code:
let statusesShowEndpoint = "https://api.twitter.com/1.1/friends/ids.json"
params = ["screen_name": user]
request = client.URLRequestWithMethod("GET", URL: statusesShowEndpoint, parameters: params, error: &clientError)
client.sendTwitterRequest(request) { (response, data, connectionError) -> Void in
if connectionError != nil {
print("Error: \(connectionError)")
}
guard let myData = data else {
print("error nil")
return
}
let json = JSON(data: myData)
print("json \(json)")
self.followingIDs = json["ids"].arrayValue.map { $0.intValue}
}
Here is the error:
Error: Optional(Error Domain=TwitterAPIErrorDomain Code=88 "Request failed: client error (429)" UserInfo={NSLocalizedFailureReason=Twitter API error : Rate limit exceeded (code 88), TWTRNetworkingStatusCode=429, NSErrorFailingURLKey=https://api.twitter.com/1.1/users/show.json?user_id=109113333, NSLocalizedDescription=Request failed: client error (429)})
Any suggestion?
Thanks.