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 andrestallos · Jun 20, 2018 at 03:01 PM · apisCloudScriptPlayer Data

GetPlayerCombinedInfoRequest no longer includes DisplayName in response

Hello,

We have recently noticed that the API call server.GetPlayerCombinedInfoRequest is no longer including the DisplayName in the response. We have been using this call in a cloudscript handler to let players check out a different player's profile, and it was working as expected until recently (one or two days ago, we aren't sure).

We set the GetPlayerProfile flag in the request as true, and we do get the PlayerProfile in the response, but it does not include the DisplayName. It does include PublisherId, TitleId, PlayerId and LastLogin.

For now, we have implemented a workaround adding another API call, server.GetPlayerProfile, which does include the DisplayName in the response, but this is obviously inefficient.

As I mentioned, it was all working fine until recently, and now it's failing consistently (and we haven't touched our code). I haven't seen any note about this in the release notes, so I'm flagging this in case there's a bug somewhere!

Cheers

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

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Jun 22, 2018 at 07:08 AM

We haven't actually changed any of the code for that API in some time. Can you let us know the Title ID, the PlayFab ID of the user you're querying, and the specific values you're passing into the call?

Comment

People who like this

0 Show 0 · 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

Answer by andrestallos · Jun 22, 2018 at 06:34 PM

It is happening in all our titles (for example 8A42), and for all players. Say player 7815908F20BAF70F makes the cloudscript call, and passes 7B26A208FA72733F in args.Data.playerId, in the following cloudscript call:

handlers.OnGetOtherPlayerData = function(args)
{
var infoRequestParameters = new Object();
infoRequestParameters.GetUserVirtualCurrency = false;
infoRequestParameters.GetUserData = false;
infoRequestParameters.GetUserReadOnlyData = true;
infoRequestParameters.UserReadOnlyDataKeys = ["AchievementsData","AchievementsCurrentData","CosmeticData","GuildData","LevelData","Xp", "DailyCounters"];
infoRequestParameters.GetPlayerStatistics = true;
infoRequestParameters.PlayerStatisticNames = ["Rating","Xp"];
infoRequestParameters.GetPlayerProfile = true;
infoRequestParameters.ProfileConstraints = new Object();
infoRequestParameters.ProfileConstraints.ShowLastLogin = true;
var playerCombinedInfo = server.GetPlayerCombinedInfo({PlayFabId:args.Data.playerId, InfoRequestParameters:infoRequestParameters});
var playerCombinedData = playerCombinedInfo.InfoResultPayload;
log.info("playerCombinedData " + JSON.stringify(playerCombinedData));// Checking this result shows PlayerProfile data with all expected fields except DisplayName
var playerData = new Object();
playerData.playerName = playerCombinedData.PlayerProfile.DisplayName; // This used to get the displayname correctly, but now is empty
//...
Comment

People who like this

0 Show 2 · 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 Brendan ♦♦ · Jun 23, 2018 at 09:06 PM 0
Share

The profile constraints requested *by setting the relevant parameter to true) are the only ones returned. So unless you set ShowDisplayName to true in ProfileConstraints, it cannot be returned.

avatar image andrestallos Brendan ♦♦ · Jun 24, 2018 at 03:22 PM 0
Share

Ooops! You are absolutely right, I don't know how we missed that. Setting ShowDisplayName to true gets it working perfectly.

I'm pretty sure that it was somehow working before, without having to add that line, but in any case this is indeed how I understand it should work according to the documentation.

Thank you for looking into it, and sorry for the mistake!

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

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Get players in segment count Via cloud script and update title data 1 Answer

    title_player_account PlayFabId does not work with cloud script 1 Answer

    Request timeout 3 Answers

    UpdatePlayerStatistics misleading error when Value is not int32 1 Answer

    CloudScript Handler to get player IDs from segment often returns Internal Server Error 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