I have made a two way friend system. So when two users are friends they both of them are added to their respective friend list and also I am setting some tags(ex: confirm)
Now, when any of these player calls GetFriendLeaderboard API with "ShowTags" as true. I would expect that the tag "confirm" shows up in the tag array in the response. But this is not the case, I am getting empty tag array
Why is the tag "confirm" not been shown up in the response?
Answer by Citrus Yan · Mar 06, 2020 at 05:34 AM
The “tag” you were expecting to retrieve from the GetFriendLeaderboard API call is not the same thing as the one you set for the player’s friend. The former is in the PlayerProfileModel representing each player’s profile, which is set by the AddPlayerTag API, however, the latter resides in the FriendInfoModel, which is set by the SetFriendTags API. If you want these friend tags to show up in your game’s Leaderboard interface, you may also need to call the GetFriendsList API to get each player’s friend tags and combine them with the results returned from the GetFriendLeaderboard API.
@Citrus Yan Yeah that would Work Exactly how i wanted but i am having a problem i dont know how to work with tags in playfab and i can't even find a pinch of code to get around with it // Here's my code i don't know how to do it public void GetFriendsList(System.Action<GetFriendsListResult> result, System.Action<PlayFabError> error){ GetFriendsListRequest request = new GetFriendsListRequest(); request.IncludeSteamFriends = false; request.IncludeFacebookFriends = false; request.XboxToken = null; request.ProfileConstraints.ShowTags = true; PlayFabClientAPI.GetFriendsList(request, result=>{ FriendList = result.Friends; foreach(friendinfo Friend in FriendList){ Friend.Tags // Don't Know What to do here plz help suppose i wanted to get tag for confirm now what to do ? } }, error); }
Hi @HackerTester, have you enabled the access of Tags at [Game manager] -> [Title Settings] -> [Client Profile Options] ?
i think the ans to my question was on this thread Thanks for helping ----
https://community.playfab.com/questions/54847/how-to-work-with-tags-in-playfab-friends.html
"Internal Server Error" in GetFriendLeaderboard API 0 Answers
Cloud script Friends GetPlayerStatistics vs GetFriendLeaderboard considering request limit 1 Answer
Server API for GetFriendLeaderboardAroundPlayer equivalent missing 1 Answer
best practice for saving statistics for leaderboards 1 Answer
Leaderboard related Questions 1 Answer