本文介绍了facebook opengraph crawler不发送给我fb_locale的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个支持多个语言环境的开放对象(在本示例中,默认情况下为en_US,fr_FR)。
I have an opengraph object that supports multiple locales (in this example, en_US by default and fr_FR).
这是生成的HTML页面的示例由Facebook开放的用户使用,但是当我自己打电话时。
This is an example of the generated html page that is used by the facebook opengraph but when I call it myself.
Default:
<meta property="og:locale" content="en_US"/>
<meta property="og:locale:alternate" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:title" content="chair" />
?fb_locale=en_US
<meta property="og:locale" content="en_US"/>
<meta property="og:locale:alternate" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:title" content="chair" />
?fb_locale=fr_FR
<meta property="og:locale" content="fr_FR"/>
<meta property="og:locale:alternate" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:title" content="chaise" />
Facebook抓取工具不会向我发送fb_locale或X-Facebook-Locale。
Facebook crawler doesn't send me neither fb_locale nor X-Facebook-Locale.
解决方案:
curl -X POST -F "id=http://yoururl" -F "scrape=true" -F "locale=fr_fr" "https://graph.facebook.com" -s
(在我的例子中,我使用fr_fr)
(in my example, I used fr_fr)
推荐答案
我编辑了这个问题,答案是问题。
I edited the question, the answer is in the question.
这篇关于facebook opengraph crawler不发送给我fb_locale的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!