TWTRAPIClient "Request failed: client error (429)"



I am using the TwitterKit 1.15.3 for iOS (I need to use this version because of ios 7.0).
Also, I have tried with the newest TwitterKit version (2.6.1) and same thing happening.

I’m using TWTRAPIClient’s method: loadTweetWithID to load tweet. This is working ok couple of minutes and then
when I need to load new tweet i’am getting on error callback:
Failed to load tweet: Error Domain=TwitterAPIErrorDomain Code=88 “Request failed: client error (429)” UserInfo={NSErrorFailingURLKey=[some id], NSLocalizedDescription=Request failed: client error (429), NSLocalizedFailureReason=Twitter API error : Rate limit exceeded (code 88)}

TWTRAPIClient *client = [[TWTRAPIClient alloc] initWithUserID:nil];
[client loadTweetWithID:tweetID completion:^(TWTRTweet *tweet, NSError *error) {
if (tweet && !error) {
    TWTRTweetView *tweetView = [[TWTRTweetView alloc] initWithTweet:nil style:TWTRTweetViewStyleRegular];
    tweetView.frame = self.bounds;
    [self addSubview:tweetView];
    tweetView.hidden = YES;
    tweetView.showActionButtons = YES;
    tweetView.showBorder = YES;
    self.tweetView = tweetView;
    tweetView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
} else {
    NSLog(@"Failed to load tweet: %@", error);

I have read over the internet about API limits and I am sure my application is not breaking the limits.
Also I have read similar posts, but I couldnt find anything related to TwitterKit.
Please advise.



Hey @OggieNS,

Based on the logs I’m seeing, you are hitting a rate limit. This may be due to heavy testing before releasing a new version of your app - if you try again now, do you still see the same error?



Hi Bonnell,

actually i have used wrong twitter keys. The production ones didnt have limits.
Thank you