hi, if i log like this:
PlayFabClientAPI.LoginWithCustomID( // Request new LoginWithCustomIDRequest { CustomId = SystemInfo.deviceUniqueIdentifier, CreateAccount = true }, // Success result => { Debug.Log("Login completed."); IsLoggedIn = true; onSuccess(result); }, // Failure error => { Debug.LogError("Login failed."); Debug.LogError(error.GenerateErrorReport()); onFailed(error); } );everithing working, but, if I log like this:
// PlayFabClientAPI.LoginWithFacebook( // // Request // new LoginWithFacebookRequest // { // TitleId = PlayFabSettings.TitleId, // AccessToken = Facebook.Unity.AccessToken.CurrentAccessToken.TokenString, // CreateAccount = true // }, // // Success // result => // { // Debug.Log("Login completed."); // IsLoggedIn = true; // onSuccess(result); // }, // // Failure // error => // { // Debug.LogError("Login failed."); // Debug.LogError(error.GenerateErrorReport()); // onFailed(error); // } // );
i get this error:
PlayFabException: Must be logged in to call this method
when i call:
GetAccountInfoRequest request = new GetAccountInfoRequest(); PlayFabClientAPI.GetAccountInfo(request, SuccessGetId, fail);
Why it's appening? and how can i fix this?