在Android中,
Twitter连接失败。需要SSL吗?
我的代码以前完美运行,并且目前是一个在线应用程序。但是,自2014年以来它一直无法工作,我听说Twitter已经应用了https或使用SSL概念。
帮我解决这个问题。
这是我的日志。
03-14 15:00:02.838: D/TwitterApp(697): Error getting access token
03-14 15:00:02.878: W/System.err(697): 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
03-14 15:00:02.878: W/System.err(697): message - SSL is required
03-14 15:00:02.878: W/System.err(697): code - 92
03-14 15:00:02.878: W/System.err(697): Relevant discussions can be found on the Internet at:
03-14 15:00:02.878: W/System.err(697): http://www.google.co.jp/search?q=6f0f59ca or
03-14 15:00:02.888: W/System.err(697): http://www.google.co.jp/search?q=20d0f73f
03-14 15:00:02.888: W/System.err(697): TwitterException{exceptionCode=[6f0f59ca-20d0f73f], statusCode=403, message=SSL is required, code=92, retryAfter=-1, rateLimitStatus=RateLimitStatusJSONImpl{remaining=14, limit=15, resetTimeInSeconds=1394790328, secondsUntilReset=-18874}, version=3.0.3}
03-14 15:00:02.888: W/System.err(697): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177)
03-14 15:00:02.888: W/System.err(697): at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
03-14 15:00:02.888: W/System.err(697): at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:89)
03-14 15:00:02.888: W/System.err(697): at twitter4j.TwitterBaseImpl.fillInIDAndScreenName(TwitterBaseImpl.java:126)
03-14 15:00:02.888: W/System.err(697): at twitter4j.TwitterImpl.verifyCredentials(TwitterImpl.java:592)
03-14 15:00:02.908: W/System.err(697): at com.twitter.android.TwitterApp$3.run(TwitterApp.java:150)
Twitter连接代码。 http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/ 这是一个开发教程