question

Canberk Soner avatar image
Canberk Soner asked

Response JSON does not contain FriendInfo fields when making GetFriendsList client call

Using this client API call: https://api.playfab.com/documentation/Client/method/GetFriendsList

I'm trying to get information about a player's friends.

When I make empty request from postman, I receive this response:

{
    "code": 200,
    "status": "OK",
    "data": {
        "Friends": [
            {
                "FriendPlayFabId": "E3D38E3DC5B584D9",
                "TitleDisplayName": "canberkpc2",
                "Tags": [
                    "Confirmed"
                ],
                "FacebookInfo": {}
            },
            {
                "FriendPlayFabId": "839CABAA41D6CAF5",
                "TitleDisplayName": "canberkpc3",
                "Tags": [
                    "Confirmed"
                ],
                "FacebookInfo": {}
            }
        ]
    }
}

However, when I specify which profile information to get with this request:

{
  "ProfileConstraints":
  {
  	"ShowAvatarUrl": true,
  	"ShowDisplayName": true,
  	"ShowLastLogin": true,
  	"ShowTags": true
  }
}

I receive the following response:

{
    "code": 200,
    "status": "OK",
    "data": {
        "Friends": [
            {
                "FriendPlayFabId": "839CABAA41D6CAF5",
                "Profile": {
                    "PublisherId": "68B00BB399F71A2A",
                    "TitleId": "3E40",
                    "PlayerId": "839CABAA41D6CAF5",
                    "LastLogin": "2018-11-19T17:25:57.38Z",
                    "DisplayName": "canberkpc3",
                    "Tags": []
                }
            },
            {
                "FriendPlayFabId": "E3D38E3DC5B584D9",
                "Profile": {
                    "PublisherId": "68B00BB399F71A2A",
                    "TitleId": "3E40",
                    "PlayerId": "E3D38E3DC5B584D9",
                    "LastLogin": "2018-11-16T14:28:02.545Z",
                    "DisplayName": "canberkpc2",
                    "Tags": []
                }
            }
        ]
    }
}

As you notice, compared to the first case, FriendInfo object is missing its fields such as Tags, TitleDisplayName, FacebookInfo etc. As a workaround, I have to make another api call for each friend to retrieve necessary information once more.

But this behaviour is not what it says on the documentation of GetFriendsList. The documentation shows Profile and all other fields on FriendInfo object filled.

So, is there a bug or is there something wrong with my title's configuration? I've set up client profile options for fields I want and I can retrieve them, I just can't get them on same request as shown on the example.

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

·
Andy avatar image
Andy answered

Yep, that's a known bug that was reported here: https://community.playfab.com/questions/24259/getfriendslist-not-returning-friendtags.html

I'm pretty sure Tags are the only thing that isn't returned that couldn't also be specified in your ProfileConstraints options.

1 comment
10 |1200

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

Canberk Soner avatar image Canberk Soner commented ·

Thanks for the answer Andy. I'll make 2 calls until the bug is fixed on your side.

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.