开发者

How to specify a locale to Facebook OAuth Dialog?

开发者 https://www.devze.com 2023-03-14 03:25 出处:网络
I\'m trying to get my users to log into Facebook using the OAuth Dialog API. I\'m talking about: http://www.facebook.com/dialog/oauth

I'm trying to get my users to log into Facebook using the OAuth Dialog API. I'm talking about: http://www.facebook.com/dialog/oauth

How can I specify a locale (ex: "fr_FR") so that the dialog displays in the locale's l开发者_如何学JAVAangauge? I've tried using the obvious locale=fr_FR in the URL but that doesn't work.


The page on Facebook requesting for the user to grant access for your application is based on the user's settings on Facebook. For defining the locale in non-iframe social plugins using the JavaScript SDK, you need to define the locale when loading the SDK:

<script src="http://connect.facebook.net/en_US/all.js">


Im using FB Social provider + auth0 and had the same challenge. https://developers.facebook.com/docs/javascript/internationalization#:~:text=Note%20that%20this%20only%20applies%20to%20plugins%20and%20buttons%20that%20are%20directly%20integrated%20with%20your%20site.%20Dialog%20such%20as%20the%20Login%20Dialog%20render%20in%20the%20language%20that%20the%20person%20has%20picked%20as%20their%20native%20language%20on%20Facebook%2C%20even%20if%20it%27s%20different%20than%20the%20language%20you%20select. here it says for *dialog/oauth: Dialog such as the Login Dialog render in the language that the person has picked as their native language on Facebook, even if it's different than the language you select. i tested it is correct

so does not matter what param locale you will pass it is goign to use language provided in user setting profile

0

精彩评论

暂无评论...
验证码 换一张
取 消