Reputation: 117
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
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