How to implement internationalization of OG-Tags?

别说谁变了你拦得住时间么 提交于 2019-11-30 03:58:11

I had the same problem and wrote to facebook support. Their answer was like this:

... The use case for Open Graph Localization is not for sharing links on Facebook and having the meta data localized. Instead it is meant to be used as part of custom Open Graph stories such as "X completed a level".

Basically when an open graph story is published using a link to a self-hosted object, only then will we send the fb_locale parameter and X-Facebook-Locale HTTP header.

You can follow this link for details: https://developers.facebook.com/bugs/141601252889984

mathieug

I answered my own question: here

You have to refresh the cache of facebook.

curl -X POST -F "id=http://yoururl" -F "scrape=true" -F "locale=fr_fr" "https://graph.facebook.com" -s

(in my example, I used fr_fr)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!