question

banaheneelliot avatar image
banaheneelliot asked

Get Players Country

Hi, I am new to playfab and want to ask, how do I get the country/location of a newly registered player?

Player DataTitle Datadata
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

There is a property named “InfoRequestParameters” in the PlayFab Login methods , and in InfoRequestParameters property, you can set the “GetPlayerProfile” property to true and set the “ShowLocations” to true in the “ProfileConstraints” property to get the location of the player when they log in for the second time. Or you can also call GetPlayerProfile API and set the “ShowLocations” to true in the “ProfileConstraints” property to get the location of the player after they register and log in. In addition, please remember to check the Locations box in the [Title settings]->[ClientProfileOptions] page.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

banaheneelliot avatar image banaheneelliot commented ·

Could you give me an example code?

0 Likes 0 ·
banaheneelliot avatar image banaheneelliot commented ·

Could you give me some example code?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.