我想在我的應用程序中集成雅虎。我想,未能檢索雅虎集成在android中的請求令牌?
private static final String YAHOO_CALLBACK_URI = "MyApp://oauth";
public static final String YAHOO_REQUEST_TOKEN_URL = "http://api.login.yahoo.com/oauth/request_token";//api.login.yahoo.com
public static final String YAHOO_ACCESS_TOKEN_URL = "http://api.login.yahoo.com/oauth/access_token";
public static final String YAHOO_AUTHORIZE_URL = "http://api.login.yahoo.com/authorize";
CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(YAHOO_CONSUMER_KEY, YAHOO_CONSUMER_SERECT_KEY);
OAuthProvider provider = new CommonsHttpOAuthProvider(YAHOO_REQUEST_TOKEN_URL, YAHOO_ACCESS_TOKEN_URL, YAHOO_AUTHORIZE_URL);
provider.setOAuth10a(true);
try {
String authUrl = provider.retrieveRequestToken(consumer, YAHOO_CALLBACK_URI);// Can I pass Null for callback url.
System.out.println("AuthURL = " + authUrl);
} catch (OAuthMessageSignerException e) {
e.printStackTrace();
} catch (OAuthNotAuthorizedException e) {
e.printStackTrace();
} catch (OAuthExpectationFailedException e) {
e.printStackTrace();
} catch (OAuthCommunicationException e) {
e.printStackTrace();
}
越來越
oauth.signpost.exception.OAuthCommunicationException:通信與服務提供商的失敗:服務提供商迴應錯誤:404(未找到)
爲什麼我們不能檢索請求令牌。
嗨,我得到一個類似的錯誤,你解決了這個問題? – Kavitha
@ KC203不,我仍然在嘗試... ...與404錯誤卡住.... – Panache
感謝您的答覆,我已經看到了幾個論壇,每個人似乎都有這個問題,我懷疑現在是否也有可能。無論如何,讓我知道,如果你成功整合yahoo – Kavitha