When my game starts, if the user never linked his Facebook account, I login the user to PlayFab using the AndroidDeviceID
string deviceID = getDeviceID(); PlayFabClientAPI.LoginWithAndroidDeviceID( new LoginWithAndroidDeviceIDRequest { AndroidDeviceId = getDeviceID(), CreateAccount = true, TitleId = "9261" }, resultCallback, LogError);
I can see the account is created successfully and linked to the Android Device ID
Then when the user presses the Connect to Facebook button for the first time I want to link his Facebook account to his PlayFab account
PlayFabClientAPI.LinkFacebookAccount( new LinkFacebookAccountRequest { ForceLink = true, AccessToken = AccessToken.CurrentAccessToken.TokenString }, OnPlayfabFacebookAuthComplete, LogError);
The AccessToken is obtained successfully and the Facebook app is linked to the user account, but the account doesn't get linked to the PlayFab account: I get this error
Error Message 500 Internal Server Error UnityEngine.Debug:Log(Object) PlayFabLeaderboardManager:LogError(PlayFabError) (at Assets/Scripts/UI/PlayFabLeaderboardManager.cs:222) PlayFab.Internal.<MakeApiCall>c__AnonStorey1:<>m__1(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:133) PlayFab.Internal.<Post>c__Iterator0:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:145) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) Error Details Null UnityEngine.Debug:Log(Object) PlayFabLeaderboardManager:LogError(PlayFabError) (at Assets/Scripts/UI/PlayFabLeaderboardManager.cs:223) PlayFab.Internal.<MakeApiCall>c__AnonStorey1:<>m__1(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:133) PlayFab.Internal.<Post>c__Iterator0:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:145) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Any clue on what is causing this issue? I did some troubleshooting by linking a custom id to the PlayFab account and it works, and by logging in directly with the Facebook account, and it works
Thank you in advance