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

痞子三分冷 提交于 2019-12-23 10:14:39

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/13292796/no-authentication-challenges-foundrelevant-discussions-can-be-found-on-the-inter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!