I’m creating a multilingual Facebook Canvas game. I want it to use the user’s Facebook locale as its own locale.
I can easily get the locale of a user who is logged in and has authed my app. However:
- I need the locale before a new user authenticates my app, because I want to show some text before this option is given.
- In fact, I need it before I’ve even loaded the Javascript SDK. This is because a locale must be given when loading this (e.g. https://connect.facebook.net/en_US/all.js)
What can I do?
Parse the signed_request, that gets passed to your app when it gets loaded into canvas, server-side: https://developers.facebook.com/docs/reference/login/signed-request/