Take the 2-minute tour ×

Apparently Facebook Share doesn't pick up the title / description meta tags that are changed (via JavaScript) after the page load. It basically use the meta tags that are available upon load.

This is a simple example.

  • The link will change the title / description meta tags upon click. You can confirm that using Firebug.
  • Click the f|Share button: Facebook still always shows "A title that is available upon page load." and "A description that is available upon page load."

Anybody knows how to fix this?

share|improve this question
add comment

4 Answers

Because the facebook server hits the URL you submit and looks for meta tags. It will always default to the original tags.

share|improve this answer
add comment

Its none of Facebook business. They just provide an api for it. And api takes meta tags as parameter. So you set your meta tags to facebook sharing.

share|improve this answer
add comment

This is a quote from Facebook. They scrape the page's meta tags when someone shares that page, and every 24 hours onwards (and not on page-load as you suggested). If you change the meta tags, you need to get FB to "lint" your page again using the URL Linter.

When does Facebook scrape my page?



share|improve this answer
add comment

I assume that Facebook servers do not execute javascript when they scrape your page.

You could use server-side logic to detect the Facebook user agent and modify the outputted HTML accordingly.

According to the bottom of this page ( http://developers.facebook.com/docs/opengraph/ ), the user agent is currently:

share|improve this answer
add comment

Your Answer

