Попробуйте это:
Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer("yourConsumerKey","yourConsumerSecret");
RequestToken requestToken = twitter.getOAuthRequestToken();
session.setAttribute("token", requestToken.getToken());
session.setAttribute("tokenSecret", requestToken.getTokenSecret());
// REDIRECT USER TO TWITTER LOGIN PAGE
response.sendRedirect(requestToken.getAuthorizationURL());
CALLBACK URL СТРАНИЦА КОД:
Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer("yourConsumerKey","yourConsumerSecret");
AccessToken aToken = twitter.getOAuthAccessToken(new RequestToken((String) session.getAttribute("token"), (String) session.getAttribute("tokenSecret")));
twitter.setOAuthAccessToken(aToken);