Important: this documentation is not applicable to your currently selected format stories!
Displays a Facebook post, video or comment.
<script async custom-element="amp-facebook" src="https://cdn.ampproject.org/v0/amp-facebook-0.1.js"></script>
You can use the
amp-facebook component to embed a Facebook post, a Facebook video or a comment on a Facebook post.
Example: Embedding a post
<amp-facebook width="552" height="310" layout="responsive" data-href="https://www.facebook.com/ParksCanada/posts/1712989015384373"> </amp-facebook>
Example: Embedding a video
<amp-facebook width="476" height="316" layout="responsive" data-embed-as="video" data-href="https://www.facebook.com/nasaearth/videos/10155187938052139"> </amp-facebook>
Example: Embedding a comment on a post
<amp-facebook width="552" height="500" layout="responsive" data-embed-type="comment" data-href="https://www.facebook.com/zuck/posts/10102735452532991?comment_id=1070233703036185"> </amp-facebook>
|data-href (required)||The URL of the Facebook post/video/comment. For example, a post or video will look like |
|data-embed-as||The value is either |
Both posts and videos can be embedded as a post. Setting
Check out the documentation for differences between post embeds, video embeds, and comment embeds.
|data-include-comment-parent||The value is either |
When you are embedding a comment reply, you can optionally also include the parent comment of the reply.
|data-allowfullscreen||The value is either set or omitted. The default is omitted (no fullscreen).
When embedding a video, set this value to allow for a fullscreen experience.
|data-align-center||The value is either |
For posts and videos, having this attribute set to true would align the post/video container to center.
|data-locale (optional)||By default, the locale is set to user's system language; however, you can specify a locale as well.
For details on strings accepted here please visit the Facebook API Localization page
|common attributes||This element includes common attributes extended to AMP components.|
See amp-facebook rules in the AMP validator specification.
You've read this document a dozen times but it doesn't really cover all of your questions? Maybe other people felt the same: reach out to them on Stack Overflow.Go to Stack Overflow Found a bug or missing a 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.Go to GitHub