yt coffee

Study hard, play harder.

Twitter Card and OGP Support

  • 2019-01-07 13:40
  • #Blog dev

Commit: yuku/yuku.github.io@5fe34e4

Rich snippets are now displayed when the URL of a blog post is shared on Twitter or Facebook, in support of Open Graph protocol (OGP) and Twitter Card.

During development, I implemented it by referring to the documents, and checked it using the debuggers provided by Facebook and Twitter:

The Facebook's spec requires fb:app_id, so I created a new project for this blog on Facebook and registered that ID as fb:app_id. According to the old information on the web, fb:admin was also supported in the past, but now it seems to be unified into fb:app_id.