OGP (Open Graph Protocol)
Overview
OGP (Open Graph Protocol) is a metadata standard created by Facebook. By embedding meta tags such as og:title, og:description, and og:image in a web page's HTML, you can control what appears when that page is shared on social media. Many platforms support OGP, including X (formerly Twitter), LINE (a messaging app widely used in Japan), and Discord.
Main properties
The properties most often used in OGP are the following. og:title is the page's title, og:description is its description, og:image is the URL of the thumbnail image, and og:url is the page's canonical URL. You write these inside the HTML <head> in the form "<meta property="og:title" content="..." />".
On top of that, og:type specifies the kind of page (website, article, and so on), and og:site_name sets the site name. For X, the twitter:card meta tag specifies the display format (summary, summary_large_image).
How services like question boxes use it
Services like question boxes use OGP in two situations, for example. The first is generating OGP tags on the fly so that when a question box's public page is shared on social media, the owner's name and description show up properly.
The second is generating an OGP image that puts the question and answer together as a card when an answered Q&A is shared. This image is drawn on the server, and it carries more visual information than a text-only post.