Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 610
igorlopesfaria Avatar asked Nov 08 '12 16:11

igorlopesfaria


1 Answers

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.

like image 68
igorlopesfaria Avatar answered Oct 11 '22 01:10

igorlopesfaria