Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Deekshith · Mar 05, 2020 at 03:54 PM · CloudScriptLeaderboards and StatisticsFriends

Tags does not show in GetFriendLeaderboard

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?

Comment
Deekshith

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

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.

Comment
Deekshith
HackerTester

People who like this

2 Show 5 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image HackerTester · Jul 28, 2021 at 07:25 AM 1
Share
@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);
        }

avatar image SethDu ♦ HackerTester · Jul 28, 2021 at 07:35 AM 0
Share

Hi @HackerTester, have you enabled the access of Tags at [Game manager] -> [Title Settings] -> [Client Profile Options] ?

avatar image HackerTester SethDu ♦ · Jul 30, 2021 at 04:44 AM 1
Share
@SethDu

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

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    5 People are following this question.

    avatar image avatar image avatar image avatar image avatar image

    Related Questions

    "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

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges