Hi everyone,
I’ve tried setting up a test application for testing the new twitter sdk with fabric. I’m not interested in authenticating a user, I just render some tweets based on their ids. I used the methods provided by TweetUtils, TweetUtils.loadTweet and TweetUtils.loadTweets. The code from the onCreate method of my application class is
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Fabric.with(new Fabric.Builder(this)
.kits(new TwitterCore(authConfig), new TweetUi())
.logger(new DefaultLogger(Log.VERBOSE))
.build());
The TWITTER_KEY and TWITTER_SECRET keys have been automatically generated by the Fabric plugin for Android Studio.
The problem I’m facing is that after playing a bit with the application I get the famous 429 Too Many Requests error. I dig into the internals of the android sdk, and it looks like the header values sent from twitter to retrofit say that the rate limit for lookup requests is 15, not 60! See attached image.
Does anyone know why twitter would let me perform only 15 lookup requests instead of 60, as the docs say? Are there any additional settings that I have to make?
As a note, I tried using a different set of twitter keys that I’ve got from a separate twitter application created via apps.twitter.com. When I investigated the headers received in this case, I found that the x-rate-limit-limit was 60, as the documentation says.