0
我試着通過使用YouTube的Java API我的Java桌面應用程序在我的YouTube帳戶連接,我已經按照本指南:https://developers.google.com/youtube/2.0/developers_guide_java?hl=pt-BR#ClientLogin_for_Installed_Applications看起來很容易,但IM得到一個錯誤,here'我的代碼:錯誤與YouTube的Java API,同時設置用戶憑據
String developer_key = "key123456789"; // Registered developer key
String application_name = "app"; // Registered application name
String user_account = "[email protected]"; // Server's Youtube account
String user_password = "mypass"; // Server's Youtube password
YouTubeService service = new YouTubeService(application_name, developer_key);
try {
service.setUserCredentials(user_account, user_password);
} catch (AuthenticationException e) {
System.out.println("Error: " + e);
}
,但我不斷收到此錯誤:
com.google.gdata.util.AuthenticationException: Error connecting with login URI
誤差以setUserCredentials功能發生了,有人知道我缺少的是什麼?