"Hi guys,
Firstly PLEASE update your documentation.
I am trying to make a Google Login System in Unity with using Playfab. My Code is like:
public void AuthenticateWithGoogle()
{
PlayGamesPlatform.Instance.RequestServerSideAccess(false, (task => { googleToken = task; }));
Debug.Log(googleToken);
PlayFabClientAPI.LoginWithGooglePlayGamesServices(new LoginWithGooglePlayGamesServicesRequest
{
TitleId = "167D2",
ServerAuthCode = googleToken,
CreateAccount = true // Yeni hesap oluşturulmasını istiyorsanız "true", mevcut hesapla bağlantı kurulmasını istiyorsanız "false"
}, OnLoginSuccess, OnLoginFailure);
}
public void OnGoogleLoginButtonClicked()
{
Social.localUser.Authenticate(success => {
if (success)
{
AuthenticateWithGoogle();
}
else
{
Debug.LogError("Google authentication failed.");
}
});
The problem is, nothing I've tried worked, I CANT FIND SERVERAUTHCODE OR HOW TO GET IT!
My time is limited to finish this system. So please help me immediately. "
Hi @Neils Shi this was my previous question but I cant send new message because of a server error. I tried something about the problem.
Code Part: PlayGamesPlatform.Instance.RequestServerSideAccess(boolean, (task => { googleToken = task; }));
1- There is no difference between true or false for Code Part's boolean value. Nothing changes.. 2- When i call Code Part before LoginWithGooglePlayGamesServices() method, it shows error "PlayFab login failed: Invalid input parameters" But funny, it shows that error when i call Code Part after LoginWithGooglePlayGamesServices() method too.
I do not know what is wrong. Also Google docs are very unclear. Really, nothing is explained well