I am using the koala gem in my rails app to use the Facebook Open Graph API. The primary language of the app is German.
Is there a way to set a locale to get e.g. the user's current city in German? Or is there another reliable wa to translate locations?
Just go to the Settings section of Facebook (the arrow next to the question mark, top right) and click on "download my data" at the bottom of the page called "General Account Settings." Then you'll make your request and await Facebook's compiling of your data, which is delivered via an email link.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
API Version Deprecations: As part of Facebook's Graph API and Marketing API, please note the upcoming deprecations: August 3, 2021: Graph API v3. 3 will be deprecated and removed from the platform. August 25, 2021 Marketing API v9.
The Graph API supports the passing of the locale
parameter. For Germany, this would be de_DE
.
You can test this via
GET /me?fields=location&locale=de_DE
compared to
GET /me?fields=location&locale=en_GB
Have a look at
Keep in mind that the translations are not always available, especially for OpenGraph objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With