お寿司か焼き肉食べたい

まじめな事からしょーもない事まで
めにゅーを開く(投げやり)

amp-pinterest

Pinterestウィジェット、Pin Itボタン、またはFollowボタンを表示します。

プラグインの読み込み

amp-pinterestを使用する場合は別途プラグインの読み込みが必要です。
amp.jsの後にでも読み込ませましょう。

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

基本構文と動作

どんな書き方でどんな動きすんのかを。まず簡単なものを。

Pin It button

<amp-pinterest
  height=20
  width=40
  data-do="buttonPin"
  data-url="http://www.flickr.com/photos/kentbrew/6851755809/"
  data-media="http://farm8.staticflickr.com/7027/6851755809_df5b2051c9_z.jpg"
  data-description="Next stop: Pinterest">
</amp-pinterest>

Pin widget

<amp-pinterest
  width=245
  height=330
  data-do="embedPin"
  data-url="https://www.pinterest.com/pin/99360735500167749/">
</amp-pinterest>

Follow button

<amp-pinterest
    height=20
    width=94
    data-do="buttonFollow"
    data-href="https://www.pinterest.com/kentbrew/"
    data-label="Kent Brewster">
</amp-pinterest>

各種プロパティについて(Pin It button表示時)

data-do必須 buttonPinを指定します。
data-url必須 URLを指定します。
data-media必須 表示させる画像のURLを指定します。
data-description必須 説明文を指定します。

各種プロパティについて(Follow button表示時)

data-do必須 buttonFollowを指定します。
data-href必須 URLを指定します。
data-label必須 ボタンラベルを指定します。

各種プロパティについて(Follow button表示時)

data-do必須 embedPinを指定します。
data-href必須 URLを指定します。