How to Add a Facebook Page Like Box to Blogger
In this article
You can add a Facebook Page like box to Blogger by pasting Facebook's official Page Plugin code into an HTML/JavaScript gadget or directly into your template. The plugin shows a Like button, your page's profile picture, and recent posts, and it updates automatically when you change your page. You do not need to install anything on your blog; you only need the embed code from Facebook and a place to paste it.
What You'll Need
- A Facebook Page (not a personal profile) that you admin.
- Admin access to your Blogger blog.
- The width of your blog's sidebar or content area, in pixels, so the box fits without breaking your layout.
Step-by-Step
- Get the Page Plugin code from Facebook. Go to the Facebook Page Plugin page (developers.facebook.com/docs/plugins/page-plugin). Enter your Facebook Page's full URL in the “Facebook Page URL” field. Set the width and height to match your blog's sidebar (for example, 300 pixels wide and 130 pixels tall for a compact box). Choose whether to show tabs (Timeline, Events, Messages) and whether to hide the cover photo. Click the “Get Code” button.
- Copy the code. Facebook gives you two tabs: one for the JavaScript SDK and one for the iframe. For Blogger, the iframe version is simpler and more reliable. Click the “IFrame” tab and copy the entire code block.
- Open Blogger and add a gadget. Sign in to Blogger, go to your blog's dashboard, and click “Layout” in the left menu. Find the sidebar section where you want the box to appear and click “Add a Gadget”.
- Choose the HTML/JavaScript gadget. In the gadget list, select “HTML/JavaScript”. Leave the title blank or type something like “Follow us on Facebook”.
- Paste the code. Paste the iframe code you copied into the Content field. Do not add extra HTML around it unless you know what you are doing. Click “Save”.
- Arrange and save the layout. Drag the new gadget to the position you want in the sidebar. Click “Save arrangement” at the top of the Layout page.
- Check your blog. Open your blog in a new tab and refresh. The like box should appear in the sidebar. If you do not see it, clear your browser cache or check in a private window.
If you prefer to place the box inside a post or page rather than the sidebar, you can paste the same iframe code into the post editor's HTML view. Switch the editor to “HTML view”, paste the code where you want it, and publish. The box will appear in the post body.
Common Mistakes
- Using a personal profile URL instead of a Page URL. The plugin only works with Facebook Pages. If you paste a profile link, the box will not load or will show an error.
- Pasting the JavaScript SDK code instead of the iframe code. The SDK version requires additional setup and can conflict with Blogger's scripts. The iframe version is self-contained and safer for most blogs.
- Setting the width too wide for the sidebar. If the box is wider than your sidebar column, it will overflow and break your layout. Check your template's sidebar width in the Blogger theme designer or by inspecting the page.
- Forgetting to save the layout arrangement. After adding the gadget, you must click “Save arrangement” on the Layout page, or the change will not appear on the live blog.
- Using an outdated plugin code. Facebook occasionally updates the Page Plugin. Always copy the code fresh from the official Page Plugin page rather than reusing an old snippet.
Tips
- Keep the height modest (around 130–200 pixels) so the box does not push your other sidebar widgets too far down.
- Enable the “Show Facepile” option if you want to display profile pictures of people who like your page; it adds social proof.
- If you use a responsive Blogger template, the iframe width is fixed. You can wrap the iframe in a div with
max-width:100%andoverflow:hiddento prevent overflow on small screens, but the plugin itself does not resize automatically. - Test the box on both desktop and mobile. Some Blogger templates hide sidebar gadgets on mobile, so the box may not appear there even though it works on desktop.
- Place the box high in the sidebar, above the fold, so visitors see it without scrolling.
Troubleshooting
If the box does not appear, work through these checks in order:
- Confirm the code is saved. Go back to Layout and click “Edit” on the gadget to make sure the code is still there and you clicked “Save”.
- Check the Page URL. Open the URL you entered in the plugin generator in a new tab. It must load your Facebook Page, not a login screen or a personal profile.
- Clear your browser cache. Blogger sometimes serves a cached version of your blog. Refresh with Ctrl+F5 (Windows) or Cmd+Shift+R (Mac), or open the blog in a private window.
- Try the iframe version. If you used the JavaScript SDK code, switch to the iframe code. The SDK can be blocked by Blogger's scripts or by browser privacy settings.
- Check for conflicting gadgets. Temporarily remove other HTML/JavaScript gadgets to see if one is interfering. Re-add them one by one.
- Inspect the page source. Right-click your blog and choose “View Page Source”. Search for “facebook.com/plugins/page”. If the code is not there, the gadget did not save or is not published.
- Check mobile visibility. If the box appears on desktop but not mobile, your Blogger template may be hiding the sidebar on mobile. Check your theme's mobile settings or use a responsive layout.
If none of these work, remove the gadget, clear the code, and start again with a fresh copy from Facebook's Page Plugin page. Make sure you are using the exact iframe code and that your blog is public, not private.
Frequently Asked Questions
Can I add a like box for a Facebook Group instead of a Page?
No. The Facebook Page Plugin only supports Pages. For Groups, Facebook does not offer an official embeddable like box; you can only link to the group.
Why does the box show a blank space or a loading spinner?
This usually means the Page URL is wrong, the page is not published, or the code was pasted incorrectly. Double-check the URL and re-copy the iframe code from Facebook.
Will the like box slow down my blog?
The iframe version loads Facebook's content inside a separate frame, so it has minimal impact on your blog's own load time. The JavaScript SDK version can be heavier, which is another reason to prefer the iframe.
Can I customize the colors or size of the like box?
You can set the width and height in the plugin generator. Facebook does not provide color customization for the Page Plugin; it follows Facebook's own styling.
Does the like box work on mobile browsers?
Yes, the iframe version is responsive and works on mobile browsers. However, if your Blogger template hides sidebar gadgets on mobile, the box will not be visible there. Check your template's mobile settings.
Do I need to be an admin of the Facebook Page to add the like box?
No. Anyone can generate the plugin code for any public Page. You only need admin access if you want to manage the Page itself.