You are here

How Facebook Share Works

Submitted by Will on October 18, 2012 - 1:56pm

Facebook share is constantly changing.One day they're using the sharer.php url for sharing and the next their using a fancy javascript widget.

But one thing has remained relatively constant and that is that facebook uses meta tags to grab its content to use when sharing a page.

We already have a brief blog post about this here, but it doesn't quite go into detail about how facebook sharing works.

Basically it boils down to open graph meta tags. And specifically the ones most people worry about are the "og:description" and the "og:image." The image below should help.

og:image determines what image is displayed
og:url determines what url is shared
og:description determines the text that is shared with the page
og:title determines the bolded text that is shared.

All of these meta tags (in the format described here) should be placed in the <head>.

Facebook even supplies users with a handy debugger which allows you to figure out what your sharing and what you may be doing wrong.