question

John Peterson avatar image
John Peterson asked

GetFriendsList not returning FriendTags.

Dear PlayFab community.

I am trying to write a CloudScript endpoint that will return a player's friends list, including whatever FriendTags would be associated with the friends.

The Server API GetFriendsList does *not* appear to be returning the FriendTags, and I'm wondering why.

Here is what I see in Game Manager:

And here is what server.GetFriendsList is returning:

"Friends": [
                {
                    "FriendPlayFabId": "121BD68E8A8B5E87",
                    "Profile": {
                        "PublisherId": "1855D4D27C9DFD4C",
                        "TitleId": "44B1",
                        "PlayerId": "121BD68E8A8B5E87"
                    }
                }
            ]

Is there any way to get the FriendTags? I need this information with which to filter friends as per this two-way friend confirmation recommendation.

Any help would be much appreciated!

CloudScriptFriends
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

·
John Peterson avatar image
John Peterson answered

Hmmm...I see something interesting when I call GetFriendsList():

If I call it with an undefined ProfileConstraints (for GetFriendsListRequest), I do get the FriendTags!

But if I call it with anything in ProfileConstraints, I do not get the FriendTags.

It's almost like ProfileConstraints should have a "ShowFriendTags" or something.

Is there any way to specify ProfileConstraints *and* show the FriendTags? Or am I going to need to call GetFriendsList() twice and merge the data to get the results that I need?

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.

Andy avatar image Andy ♦♦ commented ·

You're right! I was investigating this a bit this morning and noticed the same thing. Taking a look at the service code, when a profile is specified we build the response differently and don't include the tags. That seems like an oversight. It should be a pretty simple fix. I'll get the bug filed.

For now, unfortunately, you're left with needing to make two calls if you need profile data and tags.

1 Like 1 ·

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]