The Like button is a simple plugin
that will let people quickly share
content with their friends on
Facebook.
When someone clicks on a Like
button on a site, a connection is
created in the Graph between
the content and that person: an
Open Graph Like action will be
published, and stories will
appear on that person's timeline
and their friends' news feeds.
This story will link back to the
site and drive distribution of
content.
The story created by the Like
action can be enriched by using
meta tags to turn a simple HTML
page into an Open Graph object.
If you plan to use the Like button
on any page on your website,
you should follow the guide to
including meta tags to ensure
published stories look great in
news feed, on Timeline, and get
the best possible distribution
from people.
The Like button itself displays a
count of all the likes and shares
of the content, and a few other
metrics which are listed in the
Frequently Asked Questions
below. An option to comment on
the story will appear when the
Like button is clicked, if it is
configured correctly - letting
people comment after liking will
give the published story extra
prominence in news feed.
You can use the configurator
below to customize the layout
and style of Like buttons, and
grab a small snippet of code to
insert into your HTML pages to
implement the plugin in minutes.
Get the Code
If you implemented the Like
button before November 7th,
2012, read this notice.
On this date we updated how
the Like button will function with
respect to content restrictions,
publishing updates to users and
integration with the Built-in Like
action.
Like buttons that were
implemented prior to this update
should read the following
developer doc about the Like
Button Migration as they may
require changes to continue
working.
After July 2013 migration, Like
button will require an absolute
URL in the 'href' parameter.
There are three different ways to
implement the Like button: using
HTML5, XFBML (a special
Facebook markup) and iframe.
HTML5 and XFBML versions are
more versatile, but requires use
of the JavaScript SDK (snippets to
use this are included in the
configurator. These versions re-
size height according to whether
there are profile pictures to
display, give you the ability
(through the Javascript SDK) to
listen for edge.create events so
that you know in real time when
a user clicks the Like button, and
enable the comment box that
appears after clicking.