Emre Canbazoğlu
Emre Canbazoğlu

Reputation: 117

android - twitter4j getOAuthRequestToken() error

Why might this code throws exception? I don't have any idea. I entered the consumer key correctly and that's the only reason I can think that can cause this exception. (currentRequestToken is RequestToken)

public String beginAuthorization() {
   try {
      if(null == currentRequestToken) {
         currentRequestToken = twitter.getOAuthRequestToken();
      }
      return currentRequestToken.getAuthorizationURL();
   } catch (TwitterException e) {
      e.printStackTrace();
   }
   return null;
}

Upvotes: 2

Views: 1865

Answers (1)

Alex Alex
Alex Alex

Reputation: 31

I had the same problem, in my case the solution was in my twitter account --> for developers --> My applications --> Settings --> Application type I changed to: Read, Write and Access direct messages.

Upvotes: 3

Related Questions