Hi,
I've been seeing some weird behavior around login with facebook on iOS. There seem to be some related problems from a while back that suggest this shouldn't be possible:
https://community.playfab.com/questions/10846/bug-two-accounts-linked-with-the-same-facebook.html
I've logged in with Facebook to Playfab in the Unity editor as well as on Android and I get the same Playfab acccout:
https://developer.playfab.com/en-US/5E004/players/1BB7E62D14EE9380/overview
When I log in with Facebook to Playfab on iOS, I'm getting a new account created instead of being logged into the same account from Unity Editor/Android. I've ensured the Facebook app is installed on the device - I even tried uninstalling/reinstalling and logging in to the Facebook app again to confirm I am actually signed into the correct Facebook account. Here is the new Playfab account created:
https://developer.playfab.com/en-US/5E004/players/97E808C9B1F5D522/overview
I feel like I tested this a while back and it was working correctly, but now I'm running out of ideas on where to look next.
Here is my code just slightly altered from the example code to add an initial custom id:
using System; using Facebook.Unity; using PlayFab; using PlayFab.ClientModels; using UnityEngine; using UnityEngine.UI; public class PlayfabFacebookAuthExample : MonoBehaviour { public Button _loginWithFacebook; public void Start() { SetMessage("Initializing Facebook..."); FB.Init(OnFacebookInitialized); _loginWithFacebook.onClick.AddListener(LoginWithFacebook); LoginWithCustomId(); } private void LoginWithCustomId() { PlayFabClientAPI.LoginWithCustomID(new LoginWithCustomIDRequest { CreateAccount = true, CustomId = Guid.NewGuid().ToString() }, result => SetMessage("PlayFab Custom Login Complete. Session ticket: " + result.ToJson()), error => SetMessage("PlayFab Custom Login Failed: " + error.GenerateErrorReport(), true)); } private void LoginWithFacebook() { PlayFabClientAPI.LoginWithFacebook( new LoginWithFacebookRequest { CreateAccount = true, AccessToken = AccessToken.CurrentAccessToken.TokenString }, result => SetMessage("PlayFab Facebook Login Complete. Session ticket: " + result.ToJson()), error => SetMessage("PlayFab Facebook Login Failed: " + error.GenerateErrorReport(), true)); } private void OnFacebookInitialized() { SetMessage("Logging into Facebook..."); if (FB.IsLoggedIn) FB.LogOut(); FB.LogInWithReadPermissions(null, OnFacebookLoggedIn); } private void OnFacebookLoggedIn(ILoginResult result) { if (result == null || string.IsNullOrEmpty(result.Error)) { SetMessage("Facebook Auth Complete! Access Token: " + AccessToken.CurrentAccessToken.TokenString); } else { SetMessage("Facebook Auth Failed: " + result.Error + "\n" + result.RawResult, true); } } public void SetMessage(string message, bool error = false) { if (error) Debug.LogError(message); else Debug.Log(message); } }