我试图在我们的应用程序中实现G +登录,但是,尽管已经反复更新客户端ID,并重新创建一个新的,我继续收到错误说
I/GLSUser? GLS error: INVALID_CLIENT_ID myemail@domain.com oauth2:https://www.googleapis.com/auth/plus.login
Run Code Online (Sandbox Code Playgroud)
不确定是什么问题.我可以看到帐户列表弹出窗口,其他一切似乎也可以正常工作.我也仔细检查了我的客户端ID.
[编辑]
这是我正在使用的代码
private void getGoogleAccessToken() {
Bundle appActivities = new Bundle();
appActivities.putString(GoogleAuthUtil.KEY_REQUEST_VISIBLE_ACTIVITIES, "AddActivity BuyActivity");
String scopes = "oauth2:server:client_id:number-randomness.apps.googleusercontent.com" + ":api_scope:"+ Scopes.PLUS_LOGIN;
mGoogleToken = null;
try {
mGoogleToken = GoogleAuthUtil.getToken(this, mPlusClient.getAccountName(), scopes, appActivities);
} catch (IOException transientEx) {
// network or server error, the call is expected to succeed if you try again later.
// Don't attempt to call again immediately - the request is likely to
// fail, you'll hit quotas …
Run Code Online (Sandbox Code Playgroud)