AMP

Important: this documentation is not applicable to your currently selected format ads!

amp-facebook-page

Description

Embeds the Facebook page plugin.

 

Required Scripts

<script async custom-element="amp-facebook-page" src="https://cdn.ampproject.org/v0/amp-facebook-page-0.1.js"></script>

Usage

Use the amp-facebook-page component to embed the Facebook page plugin.

<amp-facebook-page
  width="340"
  height="130"
  layout="fixed"
  data-hide-cover="true"
  data-href="https://www.facebook.com/imdb/"
>
</amp-facebook-page>

Attributes

Attributes

data-href

The absolute URL of the Facebook page. For example, https://www.facebook.com/imdb/.

data-locale (optional)

By default, the locale is set to the user's system language; however, you can specify a locale as well. For details, visit the Facebook API Localization page.

data-tabs (optional)

Specifies the tabs to render (i.e., timeline, events, messages). Use a comma-separated list to add multiple tabs (e.g., timeline, events). By default, the Facebook page plugin shows the timeline activity.

data-hide-cover (optional)

Hides the cover photo in the header. Default value is false.

data-show-facepile (optional)

Shows profile photos of friends who like the page. Default value is true.

data-hide-cta (optional)

Hides the custom call to action button (if available). Default value is false.

data-small-header (optional)

Uses the small header instead. Default value is false.

title (optional)

Define a title attribute for the component to propagate to the underlying <iframe> element. The default value is "Facebook page".

Common attributes

This element includes common attributes extended to AMP components.

Validation

See amp-facebook-page rules in the AMP validator specification.

Perlu bantuan lainnya?

Anda telah membaca dokumen ini belasan kali, tetapi belum semua pertanyaan Anda terjawab? Mungkin orang lain merasakan hal yang sama. Berinteraksilah dengan mereka di Stack Overflow.

Kunjungi Stack Overflow
Menemukan bug atau ada fitur yang kurang?

Proyek AMP sangat menganjurkan partisipasi dan kontribusi Anda! Kami berharap Anda akan terus ambil bagian dalam komunitas sumber terbuka kami, tetapi kami juga menerima kontribusi satu kali untuk topik tertentu yang Anda minati.

Kunjungi GitHub