Make m.me links open in specific language - facebook

Is there any way to force the locale on an m.me link for facebook messenger. I was writing a web widget for client websites that would take their customers to their messenger page. Its for websites in UAE, so the link opens in Arabic for all customers, but most of the customers are non-Arab. Is there any way for me to set the a locale as a query param or something, so that the links will be always open in english?
Eg : https://m.me/mypage?locale=en_US will always open messenger.com in English.

You might be able to use the ref parameter to pass the locale in to your bot. You would store this value in a database, then use it to determine the language of future responses.
https://developers.facebook.com/docs/messenger-platform/discovery/m-me-links
https://m.me/mybot?ref=en_US

Related

How to track referrals when website is opened from mobile app

I am wondering if it's possible to track referrals when my website is opened from mobile app? Is there any related information provided in request headers?
Particularly interested to know if it's opened from Facebook mobile app or Instagram mobile app.
Look for the utm_source and utm_medium request parameters on your website. If they don't exist, then the best you're going to get is the user-agent of the device. Alternatively, if you're keen to always use bit.ly type shortened links, you could use a different one everywhere you post the link.

Detect Facebook language

I'm working on a Facebook application where there will be 2 languages, obviously the user can switch himself, but I would also like to detect what language the user is using on Facebook so I can set that as a default one.
I checked the opengraph API, but there doesn't seem to be any way to detect this, are there any other options?
There is look here
https://developers.facebook.com/docs/reference/api/user/
Check locale and languages
Using Graph API:
/me?fields=locale

how to localize the new 'enhanced permissions dialog'?

https://developers.facebook.com/apps/{id}/auth
now allows you to specify a Headline, Description, etc. for the authorization dialog that will be shown to users wanting to install your canvas app.
My facebook app needs to support multiple languages.
Is there anyway I can localize these values, since they are hardcoded in the Facebook settings?
Unfortunately not as of yet, from what I can see, do they allow you to have multiple versions of the text for each language. The best you can do currently is to ensure you use the right locale when grabbing the JavaScript SDK, hopefully they will ensure the buttons and other text they control are localized. The Enhanced Auth Dialog is still beta, so there is hope they'll make it better.
The accepted answer is not correct in my experience.
The locale of the dialog does not depend on the locale that the developer has specified but it depends on the user's language settings in his/her Facebook account.
I had nl_NL specified for the dialog and it would still show up in en_US. But it turns out that was the language setting of my account (i.e., the account that is viewing the dialog). Changing my account settings to Dutch fixed the problem and the new auth dialog changed to the Dutch language.

Show Different Facebook Tab App on Page for Different Locales

Does anyone know whether it's possible to show different Facebook Tab Apps in the left-hand menu of a Page depending on the locale of the user visiting the Page?
For example, I have 3 similar, but subtly different, apps built in three different languages, but only want any one user to see the app in the left-hand menu which correlates to their locale - does anyone know if is this possible?
No but you could make it just one application and use Facebook Translations for you app for the tab name. Then you could look at the signed request that Facebook POST's to your site and then show the best content based on the users country or language. You would need to map different language options to the versions you have.
In the answer of the signed request is not only, if user is fan or admin, you can find his language,too. So you can use do..case with it

How is a Facebook user's language / internationalization preference stored?

I'm developing a Facebook application for a business page. The application can only be accessed as a tab, meaning there is no box or direct access intended.
I've done my share of searching and even though I hate asking for help when I know the information I'm after must be there somewhere, I've reached
the point of exhaustion and beg for a solution.
I've managed to work with my application the way it was intended, it retrieves some data from my databases and users can view that information without
a problem. The issue here is that I'm unable to figure out a way of getting information from the user who is viewing that tab. I don't want any private stuff,
in fact, the only thing I need is to know in which language he/she is viewing FB so I can grab content in that language instead of the default.
I thought that maybe FB stored that information on a cookie, or a session variable, who knows. I'm sure I seen something like en_GB on a cookie from
FB once, but maybe it was a mere delusion from sleep deprivation.
I'm sure there is a pretty solution developed already and I just can't wait to learn about it!
Thank you for you time :)
To translate the application, you should be using facebook translations.
All the text in your app should be inside and other intl tags and the translation for these should be available on facebook translations app. Then facebook shows the translated text to the user based on their locale.
Facebook Translations app: http://www.facebook.com/translations/
You can see the strings to be translated here.
You also have to enable you applications for translations in the Translation app admin panel.
More about translations here : http://wiki.developers.facebook.com/index.php/Internationalization
Here's a method that describes getting the current user's language in a canvas frame even when the user hasn't logged in: http://fbdevwiki.com/wiki/Locales#Getting_the_User.27s_Locale . I suspect that it should also work in a page tab iframe.