Hello,
I use PlayFab with Facebook Instant Games and Phaser. FB Instant Games add-on is initialized in Playfab.
Login code works fine, but when I use UpdateUserTitleDisplayName method, I have error message will "null" instead of my titleID in the https request.
I don't understand the problem, because I set the titleID with "PlayFab.settings.titleID" ?
Thanks for your help
Error message :
In index.html
..... <!-- Séquence Facebook --> <script src="https://connect.facebook.net/en_US/fbinstant.6.3.js"></script> <script src="lib/phaser-facebook-instant-games.js"></script> <script src="https://download.playfab.com/PlayFabClientApi.js"></script> <!--<script src="lib/PlayFabClientApi.js"></script>--> <script src="js/singleton.js"></script> <script src="js/bootFB.js"></script> <script src="js/preloaderFB.js"></script> .....
In my javascript code
...... var id = "A7113"; PlayFab.settings.titleID = id; var playerId = FBInstant.player.getID(); console.log("playerId : " + playerId); // get the Player Signature for the current player FBInstant.player.getSignedPlayerInfoAsync(playerId).then( function (result) { var playerSignature = result.getSignature(); console.log("playerSignature : " + playerSignature); PlayFabClientSDK.LoginWithFacebookInstantGamesId( { FacebookInstantGamesSignature: playerSignature, TitleId: id, CreateAccount: true }, (response, error) => { if(error) { console.log(error); } else { // display account details var result = response.data; var status = "Login Successful. <br \\> Welcome Player: " + result.PlayFabId + "<br \\> Your session ticket is: " + result.SessionTicket; console.log(status); var playerName = FBInstant.player.getName(); PlayFabClientSDK.UpdateUserTitleDisplayName( { DisplayName: playerName }, (response, error) => { if (response) { console.log("PLAYFAB response : " + JSON.stringify(response)); } if (error) { console.log("PLAYFAB error : " + JSON.stringify(error)); } } ); /*var playerAvatar = FBInstant.player.getPhoto(); PlayFabClientSDK.UpdateAvatarUrl( { ImageUrl: playerAvatar }, (response, error) => { console.log("PLAYFAB response : " + JSON.stringify(response)); } if (error) { console.log("PLAYFAB error : " + JSON.stringify(error)); } });*/ } } ); }); ...................