• websites



The amp-facebook component allows embedding both Facebook posts and videos into AMP files.


Import the amp-facebook component

<script async custom-element="amp-facebook" src=""></script>

Basic usage

The amp-facebook component only requires the URL of the facebook post...

<amp-facebook width="552" height="303" layout="responsive" data-href="">


Here is a sample for a Facebook video embed.

<amp-facebook width="552" height="310" layout="responsive" data-href="">

Video with card

Setting data-embed-as="video" will embed the video with the accompanying card.

<amp-facebook width="552" height="310" layout="responsive" data-embed-as="video" data-href="">

Video without card

Setting data-embed-as="post" will embed the video without the accompanying card.

<amp-facebook width="552" height="310" layout="responsive" data-embed-as="post" data-href="">
Need further explanation?

If the explanations on this page don't cover all of your questions feel free to reach out to other AMP users to discuss your exact use case.

Go to Stack Overflow
An unexplained feature?

The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.

Edit sample on GitHub