YouTube Java API を使用して Java デスクトップ アプリケーションを介して YouTube アカウントに接続しようとしています。簡単ですが、エラーが発生しました。私のコードは次のとおりです。
String developer_key = "key123456789"; // Registered developer key
String application_name = "app"; // Registered application name
String user_account = "user@gmail.com"; // 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 関数でエラーが発生しています。何が欠けているか知っていますか?