Hello @Brendan! For Authenticate in Google Play I use play-games-plugin-for-unity v 0.9.35. Code:
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder() // enables saving game progress. //.EnableSavedGames() // registers a callback to handle game invitations received while the game is not running. //.WithInvitationDelegate(< callback method >) // registers a callback for turn based match notifications received while the // game is not running. // .WithMatchDelegate(< callback method >) // require access to a player's Google+ social graph (usually not needed) //.RequireGooglePlus() .Build(); PlayGamesPlatform.InitializeInstance(config); // recommended for debugging: PlayGamesPlatform.DebugLogEnabled = true; // Activate the Google Play Games platform PlayGamesPlatform.Activate(); Social.localUser.Authenticate((bool success) => { // handle success or failure if (success) { PlayGamesPlatform.Instance.GetServerAuthCode((authStatus, code) => { if (authStatus == CommonStatusCodes.Success) { UserEnter( code); }// !!!!!!!Not execute!!!!!!! else { OpenErrorWindow("Error authCode: " + authStatus.ToString() + "Code: " + code); } ///I get this }); } });
For login with Google on PlayFab I use code:
public void UserEnter(string token) { LoginWithGoogleAccountRequest request = new LoginWithGoogleAccountRequest() { TitleId = PlayFabSettings.TitleId, AccessToken = token, }; PlayFabClientAPI.LoginWithGoogleAccount(request, (result) => { Lobby.Instance. OpenErrorWindow("Sucess Play fab login"); }, (error) => { Lobby.Instance.OpenErrorWindow("Error " + error); }); }
And I always get an error "Error authCode: DeveloperErrorCode: ". Google Play Game Services, Google+ and Google Play Developer API is on and project associated with API console. What's wrong? Could I get information from scratch, step by step how I get correct AccessToken?