All API calls fail


#1

I have two applications. Both use the same consumer key and access token. One application connects to twitter and pulls tweets. The second application connects to twitter but fails on any further API calls. The second application used to work fine a few weeks ago but for some random reason, just started failing.

This is what my code looks like

try {
// This part is successfull.
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true)
.setOAuthConsumerKey(AppConfiguration.getValue(AppConfiguration.TWITTER_CONSUMER_KEY))
.setOAuthConsumerSecret(AppConfiguration.getValue(AppConfiguration.TWITTER_CONSUMER_SECRET))
.setOAuthAccessToken(AppConfiguration.getValue(AppConfiguration.TWITTER_ACCESS_TOKEN))
.setOAuthAccessTokenSecret(AppConfiguration.getValue(AppConfiguration.TWITTER_ACCESS_TOKEN_SECRET));
TwitterFactory tf = new TwitterFactory(cb.build());
twitter = tf.getInstance();
} catch (Exception e) {
// Do error handling but the connection never fails.
return;
}

// This fails. This could be any method that’s part of the Twitter object but they all fail.
twitter.getUserTimeline(“some_user”);