Reputation: 6434
In iMessage, when you share a webpage, the URL gets expanded to a nice preview, like this:
How do I go about adding this metadata to my own website?
Upvotes: 1
Views: 1606
Reputation: 6434
Turns out, you get these previews by implementing The Open Graph protocol, like so:
<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="An Eclipse Chaser’s Guide to Your First Eclipse" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.nytimes.com/2017/08/14/science/eclipse-chasers-first.html" />
<meta property="og:image" content="https://static01.nyt.com/images/2017/08/15/science/15SCI-CHASERS4/15SCI-CHASERS4-facebookJumbo.jpg" />
...
</head>
...
</html>
Upvotes: 4