Search code examples
facebook-graph-apigeolocationlocale

Facebook Graph API: is User Locale Automatically Determined by Geolocation Check?


After doing my research, I could not get an answer for this question:

When a developer gets the locale field from the User object, does this locale is based on the user's said country on their profile? Or does Facebook do a geolocation check based on the user's IP for each session to determine the locale?

This is important since I need to know how realiable the locale field is.

EDIT: So, it all appears that this locale field is indeed based on the user's said locale on their profile (see Richard's answer below). Is there a way to get a geolocation-checked country code from the FB Graph API?


Solution

  • User.locale corresponds to the display language the user has selected, eg via the link at the bottom of the home page.

    If I change my language from English to Indonesian, for example, my locale changes to id_ID.