React Facebook

EmbeddedPost

Embeds a public Facebook post on your page.

The EmbeddedPost component renders an embedded Facebook post using the fb-post XFBML class. The post must be public to be embeddable.

Try it live

Adjust width and text visibility in the Playground.

Import

import { EmbeddedPost } from 'react-facebook';

Props

PropTypeDefaultDescription
hrefstringrequiredThe URL of the Facebook post to embed.
widthstring | numberundefinedWidth of the embedded post in pixels.
showTextbooleanfalseShow the text content of the post.
lazybooleanfalseLazy-load the embedded post.
classNamestring''Additional CSS class names appended to the container.

Usage

Basic

<EmbeddedPost href="https://www.facebook.com/FacebookDevelopers/posts/10151471074398553" />

With Width and Text

<EmbeddedPost href="https://www.facebook.com/FacebookDevelopers/posts/10151471074398553" width={500} showText />

Lazy Loaded

<EmbeddedPost href="https://www.facebook.com/FacebookDevelopers/posts/10151471074398553" width="100%" lazy />

On this page