How To Put A Facebook Like Box On My Website

What can i do with the Facebook Like Box?

Given that you have previously set up a Facebook page to promote your business or project through Facebook, you can now show everybody how popular it is by connecting your website with your Facebook page. This is done by placing a box with people that like your Facebook page on your website.

How to place a Facebook Like Box on my website?

That’s very easy! The first thing you need to do is to go to the plugins section on the Facebook Developers pages: https://developers.facebook.com/docs/plugins/

There are currently a number of different plugins available, including “Like Button”, “Activity feed”, “Registration”, etc. You might find some of them being worth a closer look. But what we are looking for now is the “Like Box” plugin:https://developers.facebook.com/docs/reference/plugins/like-box/

You can change some settings like the width of the box or whether to show a header or not, and then click the button “Get Code”. Just copy the iframe code (you don’t need the XFBML code in most cases).

The code looks like something like this:


Now you need to paste this code wherever you’d like the box to appear on your website.

Here are some common examples:

WordPress And The Facebook Like Box
Go to the backend area and click on the “Appearance” button in the left hand menu. Then select “Widgets”. Here you need to drag a new “Text” widget into the area on the right hand side were you’d like the box to appear.

The description of the areas varies, depeding on the theme you’re using for your WordPress blog/ website. But commonly this would be either the First or Second Sidebar, Left or Right Sidebar, Primary or Secondary. Then paste the iframe code in the text widget and save. That’s it.

Drual And The Facebook Like Box
Go to the backend area and find the “Administer” page, usually accessible via a menu in the sidebar. On the administer page you need to look for the “Block” link. If you can’t find it this way, look around a little or ask the website administrator. Drupal websites can vary in structure and design.

On the “Block” page, find and click the “Add Block” button. Here you need to give the block a title, insert the iframe code into the block body and choose “Full HTML” from the input formats list below the block body. Then scroll to the bottom of the page and save.

Now the new block appears in the “Disabled” section of the list. You need to place the new block in the region you would the Facebook Page Box to appear, usually this would be one of the sidebars.

Save and done.

General HTML Website
If you have a simple html website, just paste the code in your html file in the appropriate location, which will be somewhere between the opening < body > tag and the closing < /body > tag.

Customising The Facebook Like Box
To change the look of the box you can change the following attributes within the iframe code:

href – the URL of the Facebook Page for this Like Box
width – the width of the plugin in pixels. Default width: 300px.
height – the height of the plugin in pixels. The default height varies based on number of faces to display, and whether the stream is displayed. With the stream displayed, and 10 faces the default height is 556px. With no faces, and no stream the default height is 63px.
colorscheme – the color scheme for the plugin. Options: ‘light’, ‘dark’
show_faces – specifies whether or not to display profile photos in the plugin. Default value: true.
stream – specifies whether to display a stream of the latest posts from the Page’s wall
header – specifies whether to display the Facebook header at the top of the plugin.





If you have any questions or suggestions regarding this tutorial please leave me a comment 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

x


Request a quote

I will get back to you within 24 hours.