Menu

Permanent Tourist

A personal website by Mark Howells-Mead

Twitter Cards – adding previews and summaries to a tweeted blog post

Facebook implemented Open Graph tags a long time ago, so that links from blogs and websites automatically pull in preview images and a summary text. That helps the viewer to see more about the linked page without having to click through.

Twitter Cards does the same thing for Twitter. I’ve been lax and only just recently come across the technology, but it was simple enough to enable here at Permanent Tourist. I just hooked the WordPress wp_head action to insert the appropriate meta tags to the head of each page, then tested them via Twitter’s card validator service.

Presto: expandable previews on Twitter of blog posts I share. Here’s how it looks on the Twitter website (after clicking View summary) and in the iOS app.

Twitter card preview

Twitter card preview on iOS