使用Google+ AccessToken创建新的ParseUser会返回InvalidSession吗?

Zen*_*Zen 11 android google-plus parse-platform

我正在尝试使用Google+ SignIn创建新的ParseUser.虽然我能够从Google成功检索访问令牌,但我得到了一个ParseException(InvalidSession).我将发布几个相关的片段.

这就是我从谷歌获取AccessToken的方式

final String SCOPES = "https://www.googleapis.com/auth/plus.login ";  
token = GoogleAuthUtil.getToken(
    MainActivity.this,
    Plus.AccountApi.getAccountName(mGoogleApiClient),
    "oauth2:" + SCOPES);
Run Code Online (Sandbox Code Playgroud)

制作ParseUser

ParseUser.becomeInBackground(token, new LogInCallback()
{
    public void done(ParseUser user, ParseException e) 
    {
        Log.i(TAG, "makeParseUser"+"2");
        if (user != null)
        {
            // The current user is now set to user.
            /*
            user.put("name", s1);
            user.put("email",s6);
            user.saveInBackground();
            */
        }else 
        {
            // The token could not be validated.
            Log.i(TAG, "makeParseUser"+e.getLocalizedMessage());
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

这里也提出类似的问题,但似乎没有一个合适的解决方案.

Tar*_*ras 0

目前Parse不支持G+登录。实际上可以通过使用 Parse 云代码来完成。

ParseUser.becomeInBackground();需要 Parse User 令牌,但不是 G+ 令牌。