我遇到了 youtube java 凭据的问题,通常它运行良好并且我能够上传到 youtube,但今天我收到了这个异常无效的凭据。
YouTubeService service = new YouTubeService("id", developer_key);
try {
service.setUserCredentials(login, "pass);
} catch (AuthenticationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
堆栈跟踪:
>
com.google.gdata.client.GoogleService$InvalidCredentialsException: Invalid credentials 11:23:07,915 ERROR [STDERR]
at com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:660) 11:23:07,915 ERROR [STDERR]
at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:560) 11:23:07,915 ERROR [STDERR]
at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:397)