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 /
  • Bugs /
avatar image
Question by max · Dec 13, 2017 at 06:47 PM · CloudScriptFriends

Server API - Possible Bug: You only get Friend tags with the GetFriendList call if the parameter ProfileConstraints is null

We're getting a friend list via CloudScript with the following function:

    export function GetFriendList(playerID): PlayFabServerModels.FriendInfo[]
    {
        let retVal = server.GetFriendsList({
            IncludeFacebookFriends: true,
            IncludeSteamFriends: false,
            PlayFabId: playerID,
            ProfileConstraints: CreatePlayerProfileViewConstraints(true, true, true)
        }).Friends;
        return retVal;
    }

This gives us the following result:

{\"FriendPlayFabId\":\"2147A0DD303F88A2\",\"Profile\":{\"PublisherId\":\"9FC655C648B8DA29\",\"TitleId\":\"6131\",\"PlayerId\":\"2147A0DD303F88A2\",\"LastLogin\":\"2017-12-13T17:32:12.368Z\",\"DisplayName\":\"jhghgj\",\"Tags\":[]}}

It only contains the profile and the PlayFabId, but not the Friend-Tags, as the documentation says:

https://api.playfab.com/documentation/server/method/GetFriendsList

If we set null for ProfileConstraints, we get this:

{\"FriendPlayFabId\":\"2147A0DD303F88A2\",\"TitleDisplayName\":\"jhghgj\",\"Tags\":[\"ReferralAcquisitionByLocalPlayer\"],\"FacebookInfo\":{}}

And it contains the Friend Tags this time! (One tag: ReferralAcquisitionByLocalPlayer)

But if we need both, the profile and the tags - we have to call the function twice and combine the results, therefore resulting in two API Calls.

Is there any fix for this?

Comment

People who like this

0 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 Brendan · Dec 14, 2017 at 12:00 AM

Thanks - that's a good catch. It looks like the fact that the profile also has a "Tags" is what tripped us up, it looks like. I'll open a bug to get this fixed.

Comment

People who like this

0 Show 7 · 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 max · Dec 14, 2017 at 12:23 AM 0
Share

Thank you! Though it's not only the tags, also the TitleDisplay name is removed from the output. But that is available in the profile, so it might be intentional...though the documentation might say otherwise ;)

avatar image Brendan ♦♦ max · Dec 14, 2017 at 02:37 AM 0
Share

Right, things that are replicated in the profile are only in the profile if you use ProfileConstraints. Basically, the API call predates the profile info, so it was done that way to be consistent with the intended usage of the profile (so, if you want the profile, but don't ask for that specific info, we shouldn't return it).

avatar image cqatproject · Apr 24, 2018 at 02:09 PM 0
Share

This bugs is not fixed yet, I am trying to fetch the friend tag but i can not do so if ProfileConstraints is not null. When will this be fixed?

avatar image max cqatproject · Apr 24, 2018 at 02:14 PM 0
Share

We are simply doing two fetch calls now. It's the only way really. It's sad since it takes double API calls then it should be, but it's a workaround.

avatar image Brendan ♦♦ max · Apr 24, 2018 at 07:13 PM 0
Share

Yes, that would be the workaround to use for now. We're very heads-down on making absolutely certain that all aspects of GDPR compliance are complete well ahead of the May 25th deadline right now, so work on items like this (where there is a usable workaround) will be somewhat delayed.

Show more comments
avatar image macrochipgames · Jun 04, 2019 at 10:36 AM 0
Share

Hello. More than a year has passed since the last message was posted on this issue and it still hasn't been fixed. Any news on when and if it will finally be fixed?

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

    4 People are following this question.

    avatar image avatar image avatar image avatar image

    Related Questions

    GetFriendsList critical error 3 Answers

    Add Friend in CloudScript Issues 1 Answer

    RemoveFriend is not always working 2 Answers

    GetFriendsList not returning FriendTags. 1 Answer

    GetFriendsList not returning Steam friends 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