我想整合twitter API使用庫twitter4j-core-2.1.1-SNAPSHOT.jar。但我收到錯誤未知主機例外2天。這裏是代碼的一部分(索引由.....(1))生成異常。未知的主機異常,同時調用方法「twitter.getOAuthRequestToken()」
公共字符串beginAuthorization(){
//showDialog("Authorization...........");
//new AuthorizationTask(this).execute("Authorize");
try {
if (null == currentRequestToken) {
Log.e("begin","i am here the line below is throwing excetion");
currentRequestToken = twitter.getOAuthRequestToken();............(1)
}
Log.e("beginAuthorization", currentRequestToken.getAuthorizationURL());
return currentRequestToken.getAuthorizationURL();
} catch (TwitterException e) {
e.printStackTrace();
}
return null;
}
人有這個問題的想法???
感謝ü提前
我接受它作爲一個正確的答案becoz是出現這種例外的原因之一 – 2012-02-29 08:46:41