question

benbean303 avatar image
benbean303 asked

GetFriendLeaderboard not returning Facebook friends

Hi, I'm working on a game on the Facebook Instant platform. To connect to the PlayFab service, I'm using the LoginWithFacebookInstantGamesId function.

I've created a working leaderboard, and can retrieve players through GetLeaderboard. When calling GetFriendLeaderboard, it only ever returns a leaderboard array of 1 (only me). Here's how it looks:

When looking at the data from GetLeaderboardAroundPlayer, I can see another player that I'm friends with on Facebook, but they do not show up on the GetFriendLeaderboard call. My profile on PlayFab also shows no friends:


Is there something more that needs to be done to link facebook friends with PlayFab friends? I assumed that by signing into PlayFab with the Facebook player signature, the friends would be synced automatically. Is this not the case? If not, how would I go about retrieving a list of Facebook friends on the Instant platform?

Leaderboards and StatisticsFriends
result.png (21.7 KiB)
nofriends.png (33.6 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

If you want to simply retrieve Facebook friends, I believe you have to call Facebook API in your client.

However, when calling GetFriendLeaderboard, the data retrieved is from PlayFab side. First, you need to make sure the player himself and all his friends has logged into PlayFab, which means they all have PlayFab player accounts linked with Facebook ID. If the players are Facebook friends, when they login into PlayFab, they will automatically add PlayFab friends. Recently we are handling a Facebook friend leaderboard related case, please see my reply on this thread as reference. Emily , Sandra, Carol… are already friends before they register/login PlayFab account, after the login successfully, you can see the friend list:

Moreover, they all should have the same player statistic (key) for the leaderboard.


8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

benbean303 avatar image benbean303 commented ·

Hi @SethDu, thanks for the response.

I believe the root cause of my issue is that PlayFab is not detecting Facebook friends. Could this be because I'm using the Facebook Instant addon instead of the normal Facebook addon? The Facebook Instant platform doesn't retrieve any user access tokens, so I cannot connect to the normal addon.

I've created two tests users that are friends with each other, and after launching the game on both accounts, PlayFab still reports that they both have no friends.

PlayFab does report that all players have a linked identify with Facebook Instant games, however:

0 Likes 0 ·
linked.png (9.4 KiB)
Seth Du avatar image Seth Du ♦ benbean303 commented ·

It is possible, the Identity in your player account looks very strange, but I haven't had enough time to test Facebook Instant Games yet. But in my point of view, this is just one of the products inside a Facebook App. May I ask have you configured the product "Facebook Login" in your app? Basically PlayFab operates all Facebook related actions via user access token.

I will double check this issue and reply later.

0 Likes 0 ·
benbean303 avatar image benbean303 Seth Du ♦ commented ·

Sorry -- replied to the wrong person. I haven't configured "Facebook Login" within my app, I'm just calling LoginWithFacebookInstantGamesId (with a signed player id from the FB Instant SDK) It's a separate SDK from the Facebook SDK. I have no way to get a player's access token through the FB Instant SDK.

0 Likes 0 ·
Show more comments
benbean303 avatar image benbean303 commented ·

I haven't configured "Facebook Login" within my app, I'm just calling LoginWithFacebookInstantGamesId (with a signed player id from the FB Instant SDK) It's a separate SDK from the Facebook SDK. I have no way to get a player's access token through the FB Instant SDK.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ benbean303 commented ·

According to the feedback from @Brendan, we suggest you send a thread on Feature Request Forum so that more people who have the same issue can vote for you to help with the priority.

    Facebook Instant Games does not use the same logic as Facebook Canvas games. In point of fact, Facebook does not provide access to the friends list in FBIG: https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2. The access they provide to friends is via their Bots.

    0 Likes 0 ·
    Jens-Stefan avatar image Jens-Stefan Seth Du ♦ commented ·

    Hello, is this still the case? Is it not possible to use GetFriendLeaderboard() to get Facebook friends when making a Facebook Instant game?

    0 Likes 0 ·
    Jens-Stefan avatar image Jens-Stefan benbean303 commented ·

    Hello,

    Did you manage to solve this issue? If yes then may I ask how?

    0 Likes 0 ·

    Write an Answer

    Hint: Notify or tag a user in this post by typing @username.

    Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.