How to embed Facebook on a website?

By Zyff

Short answer

It depends which part of Facebook you mean, and the four answers are genuinely different. A single post or video has an official embed available from its own '…' menu. A Page timeline uses Facebook's Page plugin. Your recommendations need a reviews widget, because the Page plugin does not show them well. And a like or share button is its own separate snippet.

Decide by what you want the visitor to do. A Page timeline shows activity; recommendations show proof. Most businesses embedding 'Facebook' actually want the second.

A single post or video

Open the post on Facebook, use the '…' menu in its top corner and choose Embed. You get an iframe you can paste anywhere. It works, it is official, and it renders the post exactly as Facebook chooses to.

The trade-off is that you are embedding an iframe from another domain: it loads Facebook's own scripts, it will not match your site's typography, and if the post is deleted or the Page goes private the block silently empties.

A Page timeline

Facebook's Page plugin renders a scrollable box with your Page header and recent posts. It is configured on Facebook's developer site and pasted as a script plus a div.

It is the right answer if you genuinely want to show that you post regularly. It is a poor answer for social proof, because the timeline is dominated by whatever you posted most recently rather than by what customers said about you.

Your recommendations

This is the one most people are looking for and the one Facebook does not offer a plugin for. A reviews widget reads the public recommendations on your Page and renders them in your own styling, as cards, a list, a carousel, masonry, a compact rating badge or a rotating spotlight.

Because it is your markup rather than an iframe, it inherits your fonts and colours, and it can be filtered — positive recommendations only, a minimum length, a keyword blocklist. A widget doing any of that has to say so on the page, which is why Zyff's states it automatically whenever a filter is active.

The performance question nobody asks first

Facebook's own plugins load a sizeable SDK and, on most sites, are among the heaviest third-party requests on the page. If you are embedding several Facebook elements, you are loading that SDK for all of them; if you are embedding one small element, you are loading it for one small element.

A widget that renders from a stored copy of your recommendations does not load Facebook's SDK at all, which is usually the difference between a block that appears instantly and one that appears after the rest of the page.

Facebook Reviews Widget

Show recommendations from your Facebook Page in 6 layouts.

Open the tool

Also asked

  • How do I put my Facebook page on my website?
  • How do I embed a Facebook feed?

All of these have the same answer, so they share this page rather than each getting a near-identical one of their own.