提问人:Nik 提问时间:11/10/2023 更新时间:11/13/2023 访问量:43
Unity Google Play 游戏插件 v11.01 授权码(令牌)为空
Unity Google Play Games plugin v11.01 Authorization code (token) is null
问:
成功登录帐户后,我正在尝试获取后端的授权令牌。但它总是空的。是否缺少一些代码,或者可能是 sha-1 指纹或其他东西?
private void Start()
{
PlayGamesPlatform.Activate();
LoginGooglePlayGames();
}
private void LoginGooglePlayGames()
{
PlayGamesPlatform.Instance.Authenticate((success) =>
{
if (success == SignInStatus.Success)
{
Debug.Log("Login with Google Play games successful.");
PlayGamesPlatform.Instance.RequestServerSideAccess(true, code =>
{
Debug.Log("Authorization code: " + code);
Token = code;
OnGetAuthToken?.Invoke(code);
});
}
else
{
Debug.Log("Failed to retrieve Google play games authorization code");
}
});
}
答: 暂无答案
评论