No authentication challenges foundRelevant discuss

2019-06-21 21:02发布

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?

2条回答
The star\"
2楼-- · 2019-06-21 21:41

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.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-06-21 21:46

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

查看更多
登录 后发表回答