我成功地使用了新的Google登录方式。
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestScopes(new Scope(Scopes.DRIVE_APPFOLDER))
.build();
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addApi(Drive.API)
.build();
它工作得很好,但是现在我需要认证代码以发送到我的服务器,问题是当我将这行代码.requestServerAuthCode(CLIENTID)
添加到GoogleSignInOption中时,签入失败,显示无用的状态码Status{statusCode=unknown status code: 12500, resolution=null}
。我已经设置了OAUTH并使用了正确的客户端ID。可能是什么原因呢?