サイトのトップへ戻る

Twitter 開発者 ドキュメント日本語訳

サイト内検索

ギャラリーカード

このカードは2015年の7月3日に廃止され、画像付きサマリーカードに統合されました。

The Gallery Card allows you to represent collections of photos within a Tweet. This Card type is designed to let the user know that there’s more than just a single image at the URL shared, but rather a gallery of related images.

The Tweet below from @VisitCA shows a Gallery Card below the 140 characters:

Twitter Card gallery template example

You can specify up to 4 different images to show in the gallery card via the twitter:image[0-3] tags. You can also provide attribution to the photographer of the gallery by specifying the value of the twitter:creator tag.

Our system recognizes when URLs are included in a tweet, and crawls your site to fetch the Card type and content. To learn more about how our Card system works, read our Getting Started Guide.



Sample Code

Adding a Gallery Card to your tweets is as simple as adding the below meta tags to your site:

<meta name="twitter:card" content="gallery" />
<meta name="twitter:site" content="@fodorstravel" />
<meta name="twitter:creator" content="@fodorstravel" />
<meta name="twitter:title" content="America's Best Small Towns">
<meta name="twitter:description" content="For the second year in a row, we've compiled a list that highlights some of the best places in the country you don't hear about every day.">
<meta name="twitter:url" content="http://www.fodors.com/news/photos/americas-best-small-towns" />
<meta name="twitter:image0" content="http://www.fodors.com/ee/files/slideshows/telluride-resized.jpg">	
<meta name="twitter:image1" content="http://www.fodors.com/ee/files/slideshows/shutterstock_18216130-resized.jpg">	
<meta name="twitter:image2" content="http://www.fodors.com/ee/files/slideshows/3-marfa-texas.jpg">	
<meta name="twitter:image3" content="http://www.fodors.com/ee/files/slideshows/4-paia-maui-hawaii.jpg">

Be sure to provide your own site attribution and content.

Once the tags are live, you can test your Card using our Twitter Card Validator.



App Downloads and Deep Linking

In addition to displaying your content in a more engaging way, the Summary Card can also drive downloads of and even link directly into your mobile applications. For more information, see Cards for Mobile Developers.

Additionally, you can learn how to deep-link from this Card into your mobile app by reading here.



Reference

Define the gallery card with these properties:

Card Property Required

twitter:card

Must be set to a value of “gallery”

Yes

twitter:site

The Twitter @username the card should be attributed to. Required for Twitter Card analytics.

Yes

twitter:title

The title of your content as it should appear in the card. You may specify an empty string if you wish no title to render.

Yes

twitter:description

A description of the content in a maximum of 200 characters.

No

twitter:image0

A URL to the image representing the first photo in your gallery. Image must be less than 1MB in size.

Yes

twitter:image1

A URL to the image representing the second photo in your gallery. Image must be less than 1MB in size.

Yes

twitter:image2

A URL to the image representing the third photo in your gallery. Image must be less than 1MB in size.

Yes

twitter:image3

A URL to the image representing the fourth photo in your gallery. Image must be less than 1MB in size.

Yes

For a full list of supported tags, please see the Cards Markup Tag Reference.




エンジェル戦記