facebook opengraph crawler doesn't send me fb_

2019-06-25 06:04发布

问题:

I have an opengraph object that supports multiple locales (in this example, en_US by default and fr_FR).

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 crawler doesn't send me neither fb_locale nor X-Facebook-Locale.

Solution: 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)

回答1:

I edited the question, the answer is in the question.