简体   繁体   中英

Facebook redirect_url on multiple language site

I use wordpress with nice clean urls for example:

1) http://www.mysite.com/fr/concours/

2) http://www.mysite.com/en/contest/

And i link a facebook app to the first url to support my facebook contest on the site for the french portion. But as soon as i try to login on the english portion, it obviously fails, because it is not owned by the app.

This leads me to think i need to create 2 apps handled by the same code, one for the french portion and one of the english portion. Am i right in that line of thought?

What would be your suggestion?

I'd create a single app that points to mysite.com, and create an index action that detects the user's preferred language and redirects accordingly.

Detection may happen according to the browser's Accept-Language http header, or the user's locale sent by facebook in the signed_request parameter when opening an application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM