在我的Android應用程序中,我需要添加twitter登錄功能.i已在應用程序中集成了代碼,但在返回異常ssl中未找到。 我的登錄代碼 -安卓應用程序中的Twitter集成錯誤
if (!isTwitterLoggedInAlready()) {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.setOAuthConsumerKey(TWITTER_CONSUMER_KEY);
builder.setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);
Configuration configuration = builder.build();
TwitterFactory factory = new TwitterFactory(configuration);
twitter = factory.getInstance();
try {
requestToken = twitter
.getOAuthRequestToken(TWITTER_CALLBACK_URL);
this.startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse(requestToken.getAuthenticationURL())));
} catch (TwitterException e) {
e.printStackTrace();
}
} else {
// user already logged into twitter
Toast.makeText(getApplicationContext(),
"Already Logged into twitter", Toast.LENGTH_LONG).show();
}
並返回錯誤 -
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- -following).
需要SSL
相關討論可以在互聯網上找到:
http://www.google.co.jp/search?q=10f5ada3或
http://www.google.co.jp/search?q=dceba039
TwitterException {exceptionCode = [10f5ada3 dceba039],的StatusCode = 403,retryAfter = -1,rateLimitStatus = NULL,featureSpecificRateLimitStatus = NULL,版本2.2.6 =}
空
SSL is required
空
ExceptionDiagnosis {stackLineHash = 284536227,lineNumberHash = -588537799}
我沒有得到的錯誤是什麼。
還有一個問題是app中使用了什麼回調url。
在此先感謝。