Twitter login throwing OAuthNotAuthorizedException in Android 4.3 and 4.4
I've integrated twitter in one of my application using Twitter4j, But I am not able to login in Android 4.3 and Android 4.4 devices and rest of the other devices it working fine. Following is the code snippet
consumer = new CommonsHttpOAuthConsumer("consumerKey", "consumerSecret"); provider = new CommonsHttpOAuthProvider("https://api.twitter.com/oauth/request_token", "https://api.twitter.com/oauth/access_token", "https://api.twitter.com/oauth/authorize"); oauthUrl = provider.retrieveRequestToken(consumer, "myapp://twitterOauth");
and loading oauthUrl in WebView and retrieve the accessToken. It throwing OAuthNotAuthorizedException.
Any help would be greatly appreciated!
In case you are not doing it already, you have to specify the consumer key and secret that you got from the Twitter API...