Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook opengraph crawler doesn't send me fb_locale

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)

like image 653
mathieug Avatar asked Aug 30 '12 16:08

mathieug


People also ask

Is og URL required?

You do not ever need og:url . Instead, use the existing rel=canonical standard to link to your canonical page URL. Facebook's own documentation states they support this [1]. Facebook treats the following as redirects before scraping: HTTP redirects, rel=canonical links, and og:url .

Does Facebook scrape metadata?

When content is shared for the first time, the Facebook crawler will scrape and cache the metadata from the URL shared.

How do I find an open graph on Facebook?

Using Facebook Open Graph Debugger It's the easiest way to verify Open Graph informations. To access it, go to this page: https://developers.facebook.com/tools/debug/ by being connected to your FB developer account. Paste the URL of the page you want to check, then click on the “Debugger” button.

How do you add meta tags to open graph?

Just go to Page Settings > Social Image > Upload. If you need to add other OG tags and customize the default settings, go to Page Settings > Advanced > Page Header Code Injection. Read the following section on adding the tags manually and copy-paste the code there.


1 Answers

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

like image 134
mathieug Avatar answered Oct 16 '22 17:10

mathieug