Question

I have some typical codes which used Twitter4J to connect Twitter API. They worked fine in android 1.x and 2.x. 3.x 4.x But failed in Android 4.1.1 and 4.1.2 with Nexus 7 device! Source:

private void retrieveRequestToken() {   
    mSpinner.show();  
    new Thread() {  
        @Override  
        public void run() {  
          try {  
            mRequestToken = mTwitter.getOAuthRequestToken(Twitter.CALLBACK_URI);
            mUrl = mRequestToken.getAuthorizationURL();
            mWebView.loadUrl(mUrl);
          } catch (TwitterException e) {
            mListener.onError(new DialogError(e.getMessage(), -1, Twitter.OAUTH_REQUEST_TOKEN));   
        }
    }  
    }.start();  
}

Exception: No authentication challenges foundRelevant discussions can be found on the Internet at

The problem hapens when i try to get on OAuthToken -> mTwitter.getOAuthRequestToken(Twitter.CALLBACK_URI);

Would anybody please help to investigate this issue?

Was it helpful?

Solution

I foud the problem just put the hour and date correct on device!!!! Go to Phone settings then click 'Date and Time' and select 'Automatic' (Please make sure your device Time Zone and Time,Date all are correct) If your time,Date and Time Zone are not correct then you can not connect with twitter.

OTHER TIPS

My date and time was correct set, but I just restarted my phone and it started working

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top