Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.74 KB

amp-facebook.md

File metadata and controls

53 lines (37 loc) · 1.74 KB

amp-facebook

Displays a Facebook Post or Video.

###Examples

####Embedding a post:

<amp-facebook width=486 height=657
    layout="responsive"
    data-href="https://www.facebook.com/zuck/posts/10102593740125791">
</amp-facebook>

####Embedding a video:

<amp-facebook width=552 height=574
    layout="responsive"
    data-embed-as="video"
    data-href="https://www.facebook.com/zuck/videos/10102509264909801/">
</amp-facebook>

Attributes

data-href

The URL of the facebook post/video. For example, https://www.facebook.com/zuck/posts/10102593740125791.

data-embed-as (Optional)

Either post or video; default is post.

Both posts and videos can be embedded as a post. Setting data-embed-as="video" for Facebook videos only embeds the video player, ignoring the accompanying post card with it. This is recommended if you need better aspect ratio management for the video to be responsive.

See the documentation for differences between post embeds and video embeds.