The Like button lets a user share your content with friends on
Facebook. When the user clicks the Like button on your site, a story
appears in the user's friends' News Feed with a link back to your
website.
When your Web page represents a real-world entity, things like movies, sports teams, celebrities, and restaurants, use the Open Graph protocol
to specify information about the entity. If you include Open Graph tags
on your Web page, your page becomes equivalent to a Facebook page.
This
means when a user clicks a Like button on your page, a connection is
made between your page and the user. Your page will appear in the "Likes
and Interests" section of the user's profile, and you have the ability
to publish updates to the user. Your page will show up in same places
that Facebook pages show up around the site (e.g. search), and you can
target ads to people who like your content.
Note: The count on the Like button will include all likes and shares whereas the
like
connection on the Graph API includes only the number of likes for the object.
There are two Like button implementations: XFBML and Iframe. The
XFBML (also available in HTML5-compliant markup) version is more
versatile, but requires use of the JavaScript SDK.
The XFBML dynamically re-sizes its height according to whether there
are profile pictures to display, gives you the ability (through the
Javascript library) to listen for like events so that you know in real
time when a user clicks the Like button, and it always gives the user
the ability to add an optional comment to the like. If users do add a
comment, the story published back to Facebook is given more prominence.