以前看到别人分享的链接在微信上是带图片和标题甚至还有简短描述的,但是没去想过这是怎么做到的。
直到最近偶然了解到 Open Graph Protocol 这个协议。
概括地说:Open Graph 协议就是为了社交媒体诞生的,最初由Facebook提出,现在许多社交媒体都能很好地支持这个协议。
为什么社交媒体需要这样一个协议呢?可以看看 The Open Graph Protocol 官方网页上的说明:
The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.
Open Graph 协议可以使任何网页在社交媒体上变成富媒体,举例来说,Facebook使用了这项协议才变得任何网页在Facebook上都能表现出相似的功能。
While many different technologies and schemas exist and could be combined together, there isn’t a single technology which provides enough information to richly represent any web page within the social graph. The Open Graph protocol builds on these existing technologies and gives developers one th