I am try to integrate twitter in android I have followed tutorial from following link http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/
But I am facing an exception in loginwithTwitter function at these lines
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.setOAuthConsumerKey(TWITTER_CONSUMER_KEY);
builder.setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);
Configuration configuration = builder.build();
TwitterFactory factory = new TwitterFactory(configuration);
twitter = factory.getInstance();
try {
requestToken = twitter.getOAuthRequestToken(TWITTER_CALLBACK_URL);
this.startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse(requestToken.getAuthenticationURL())));
} catch (TwitterException e) {
e.printStackTrace();
Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
}
I got e.getMessage() as null and exception occures at this line
requestToken = twitter.getOAuthRequestToken(TWITTER_CALLBACK_URL);
Please help me solve this problem. I have also searched on internet and others queries like this on stackoverflow like Android twitter login not working and Twitter Login Authentication in Android? So kindly help me I am using twitter4j-4.0.1