Hi
In the Account Summary data of each player I can see the "Country" field.
What is the way to access this data with the Client Api?
Thanks.-
Hi
In the Account Summary data of each player I can see the "Country" field.
What is the way to access this data with the Client Api?
Thanks.-
Not currently, though we will be providing more functionality for exposing/accessing profile data in future updates. But you could expose the player's current location right now via a Public (readable by others) User Data value in the player account. What is the intended use case, though? Knowing that might help to provide a better solution.
I just want to show in my game, in the player's profile, the name of his country. From now, I could save the "Country" data in the public data of the user, but as I do with players who are already registered in PlayFab? As I see you keep that data, it would be great to be able to read it with the Client Api Thanks.-
Hi, @Brendan
I am trying to build a key value map to show the country flags. Can you please share the country names as they are stored in playfab. It will be easy and accurate this way.
The country codes are listed in the PlayStream event documentation, here: https://api.playfab.com/playstream/events/datatype/CountryCode
To anyone still following along, you can use something like
https://stackoverflow.com/questions/34765235/how-to-map-a-two-letter-iso-3166-country-code-to-a-culture-in-c-sharp to get the CultureInfo, then use that to create a RegionInfo (pass it cultureInfo.Name). Then use the regionInfo.EnglishName to get the country name.
4 People are following this question.