Adding a Facebook Like button

You can use custom HTML code to add a Facebook Like button to pages and blog posts. You can also add an optional Share button. These buttons let your visitors 'like' your content and share it on Facebook.


Note: The Facebook Like button won't post directly to the visitor's Facebook timeline, but content may appear in their friends' News Feeds, depending on their feed and Facebook's algorithms.

Step 1 - Set up your Like button

To add a Facebook Like button to your site, you'll need to create the button using Facebook's developer tools. You can find those here.

Set up your button on that page:

  1. In the URL to Like box, enter your Site URL or the URL of the page on your site you'd like the button to apply to.
  2. In the Width box, enter the width you'd like your plugin to be in pixels. This will depend on the space of the area where you'd like your button to appear. Facebook automatically sets the height of the plugin.
  3. Select a style from the Layout drop-down menu.
  4. Select an Action Type from the Action Type drop-down menu.
  5. Check Show Friends' Faces to display profile thumbnails when two or more friends like this post.
  6. Check Include Share Button to display a Share Button with the Like Button.
  7. Click Get Code.


Step 2 - Copy the code

In the window that pops up:

  1. Click the IFRAME tab.
  2. Copy the code. 


Step 3 - Add the code to your site

Add the code to your site as HTML. To learn more, visit Adding custom code


Was this article helpful?
0 out of 6 found this helpful