
イントロ
<metaname="twitter:label1"content="Written by"><metaname="twitter:data1"content="hiro"><metaname="twitter:label2"content="Reading time"><metaname="twitter:data2"content="2 minutes">
こういうメタ要素をheadに入れておくと、Slackのプレビューでは下記のように反映される。
ただ、Twitterでは表示されない。

カードプロパティ
twitter:label1
,twitter:data1
,twitter:label2
,twitter:data2
は公式リファレンスには載っていない。
https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
Product Card
https://dev.twitter.com/docs/cards/types/product-cardはリンク切れしているようだったので、Wayback Machine経由で確認ができた。
概要
The Product Card is a great way to represent retail items on Twitter, and to drive sales. This Card type is designed to showcase your products via an image, a description, and allow you to highlight two other key details about your product.
[訳] 製品カードは、Twitterで小売商品を表現し、売り上げを伸ばすための優れた方法です。このカードタイプは、画像や説明で商品を紹介し、商品に関する他の2つの重要な詳細を強調できるように設計されています。
スクリーンショット
web | mobile |
---|---|
![]() | ![]() |
コード
<metaname="twitter:card"content="product"><metaname="twitter:site"content="@twitter"><metaname="twitter:creator"content="@twitter"><metaname="twitter:title"content="Logo Mug"><metaname="twitter:description"content="The perfect pick-me-up. Enjoy your favorite blend with this coffee mug featuring the Twitter logo. Make every work day good to the last drop."><metaname="twitter:image"content="https://twitter.siglercompanies.com/graphics/00000001/mug-new.jpg"><metaname="twitter:data1"content="$3"><metaname="twitter:label1"content="Price"><metaname="twitter:data2"content="Black"><metaname="twitter:label2"content="Color">
プロパティ
プロパティ名 | 概要 | 必須 |
---|---|---|
twitter:data1 | このフィールドには文字列が必要です。価格、在庫のあるアイテム、サイズなどのラベルの値を指定できます。 | 必須 |
twitter:label1 | このフィールドには文字列も必要であり、提供するデータのタイプ(価格、国など)を指定できます。 | 必須 |
twitter:data2 | 〃 | 〃 |
twitter:label2 | 〃 | 〃 |
twitter:card
公式リファレンスを参照するとtwitter:card
に指定できるタイプは以下の通り。
カードのプロパティ | 説明 |
---|---|
twitter:card | カードタイプは、“summary”、“summary_large_image”、“app”、“player”のいずれかになります。 |
そもそも<meta name="twitter:card" content="product">
の指定が意味をなさないようになっている。