Hello,
I am developing a Facebook Instant Game with the Defold game engine. I would like to implement a global, never resetting leaderboard. The players play a small session of a game and receive a score (an integer). This score should then be saved to the leaderboard.
I've managed to get saving the score to the leaderboard to work. However now I am not sure how to get the Facebook names of the leaderboard entries.
The way I do the login is by firstly, initiating the FBInstant SDK, then I get the signature, which is required for "LoginWithFacebookInstantGamesId". I then login the player with this function (CreateAccount is set to true). This call is a success and the player is logged in. I then use UpdatePlayerStatistics to insert/update the high score in the leaderboard.
For receiving the display name and avatar URI, I've already set the Client Profile Options in the Playfab dashboard to the correct settings: enabled "Avatar URL", "Display name" and "Statistics".
Now, when I get leaderboard data, using GetFriendLeaderboardAroundPlayer (IncludeFacebookFriends set to true), this is the result (mind you, I currently have just my own entry in there...none of my Facebook friends have played it):
As you can see, this does not include avatar URL, nor the player's display name.
1) Do I have to use one of these IDs (PlayerId, PublisherId, PlayFabId) to then use on the Facebook SDK to somehow get the display name and avatar image? If yes then which id and which Facebook SDK function should I use?
2) In addition to LoginWithFacebookInstantGamesId, do I need to link the created user with facebook using one of the Playfab linking functions? Or do I need to store the facebook name and avatar url to Playfab database manually?
Thanks for the help!