Do you build things with AMP? Fill out the new AMP Developer Survey!
AMP

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

amp-facebook-comments

Description

Embeds the Facebook comments plugin.

Required Scripts

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

Overview

You can use the amp-facebook-comments component to embed the Facebook comments plugin.

Example

<amp-facebook-comments
  width="486"
  height="657"
  layout="responsive"
  data-numposts="5"
  data-href="http://www.directlyrics.com/adele-25-complete-album-lyrics-news.html"
>
</amp-facebook-comments>

Attributes

data-href (required) The URL of the comments page. For example, http://www.directlyrics.com/adele-25-complete-album-lyrics-news.html.
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
data-numposts (optional) The number of comments to show. Currently Facebook SDK limits this to max 100. For details, see the Facebook comments documentation.
data-order-by (optional) The order to use when displaying comments. For details, see the Facebook comments documentation.
data-colorscheme (optional) The color scheme. For details, see the Facebook comments documentation.
common attributes This element includes common attributes extended to AMP components.

Validation

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

Besoin d'une aide supplémentaire ?

Vous avez lu ce document une douzaine de fois mais il ne répond pas à toutes vos questions ? D'autres personnes ont peut-être eu le même sentiment. Contactez-les sur Stack Overflow.

Se rendre sur Stack Overflow
Vous avez trouvé un bug ou une fonctionnalité manquante ?

Le projet AMP encourage fortement votre participation et vos contributions ! Nous espérons que vous deviendrez un membre régulier de notre communauté open source, mais nous serons également ravis de recevoir des contributions ponctuelles concernant les questions qui vous intéressent particulièrement.

Se rendre sur GitHub