getToken google+ login Android GoogleAuthException: Unknown -
this happens when call gettoken(param, param, param, param).
i not doing wrong. here code leading , including gettoken:
bundle bundle = new bundle(); bundle.putstring(googleauthutil.key_request_actions, "http://schemas.google.com/addactivity http://schemas.google.com/buyactivity"); bundle.putstring(googleauthutil.key_request_visible_activities, "http://schemas.google.com/addactivity http://schemas.google.com/buyactivity"); string clientid = "xxxxxxxxxxxxx.apps.googleusercontent.com"; if(myapplication.production){ clientid = "xxxxxxxxxxxxx.apps.googleusercontent.com"; } else { clientid = "xxxxxxxxxxxxx.apps.googleusercontent.com"; } string scopes = "oauth2:server:client_id:" + clientid + ":api_scope:oauth2:https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"; logutils.log("scopes string: " + scopes); accesstoken = googleauthutil.gettoken(ctx, mplusclient.getaccountname(), scopes, bundle); logutils.log("access token: " + accesstoken);
in return exception:
01-31 17:38:28.093: i/test(7124): googleauthexception: com.google.android.gms.auth.googleauthexception: unknown
turned out id being used on elses account too.
works now.
Comments
Post a Comment