Reddit/Facebook 如何在交联时显示 YouTube 预览?
How does Reddit/Facebook show YouTube previews when crosslinking?
Reddit 和 Facebook 在交叉链接到网站和 YouTube 视频时显示网站预览和视频预览。他们怎么做到的?这是 Reddit 方面的自定义编码还是网站开发人员可以使用的 API/config?我有一个带有视频的自定义网站,我注意到我的链接空空如也,没有预览。
YouTube 和其他网站包含有关使用 'Open Graph' meta tags in the HTML. Eg. on this YouTube video 的页面的信息,您可以在源代码中找到这些信息:
<meta property="og:site_name" content="YouTube">
<meta property="og:url" content="https://www.youtube.com/watch?v=W1ilCy6XrmI">
<meta property="og:title" content="WATCH LIVE: ABC News Channel for the latest highlights and
<meta property="og:image" content="https://i.ytimg.com/vi/W1ilCy6XrmI/maxresdefault_live.jpg">
<meta property="og:image:width" content="1280">
<meta property="og:image:height" content="720">
<meta property="og:description" content="ABC News channel provides around the clock coverage of
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="https://www.youtube.com/embed/W1ilCy6XrmI">
<meta property="og:video:secure_url" content="https://www.youtube.com/embed/W1ilCy6XrmI">
<meta property="og:video:type" content="text/html">
<meta property="og:video:width" content="640">
<meta property="og:video:height" content="360">
<meta property="og:video:tag" content="abc">
<meta property="og:video:tag" content="abc news">
<meta property="og:video:tag" content="australia">
<meta property="og:video:tag" content="news channel">
<meta property="og:video:tag" content="livestream">
<meta property="og:video:tag" content="breaking">
<meta property="og:video:tag" content="breaking news">
<meta property="og:video:tag" content="news">
<meta property="og:video:tag" content="rolling">
<meta property="og:video:tag" content="stream">
当视频 link 在 Reddit 上发布时,他们将阅读 HTML 来源并收集信息,例如页面标题、图像预览、视频嵌入 URL等,
Reddit 和 Facebook 在交叉链接到网站和 YouTube 视频时显示网站预览和视频预览。他们怎么做到的?这是 Reddit 方面的自定义编码还是网站开发人员可以使用的 API/config?我有一个带有视频的自定义网站,我注意到我的链接空空如也,没有预览。
YouTube 和其他网站包含有关使用 'Open Graph' meta tags in the HTML. Eg. on this YouTube video 的页面的信息,您可以在源代码中找到这些信息:
<meta property="og:site_name" content="YouTube">
<meta property="og:url" content="https://www.youtube.com/watch?v=W1ilCy6XrmI">
<meta property="og:title" content="WATCH LIVE: ABC News Channel for the latest highlights and
<meta property="og:image" content="https://i.ytimg.com/vi/W1ilCy6XrmI/maxresdefault_live.jpg">
<meta property="og:image:width" content="1280">
<meta property="og:image:height" content="720">
<meta property="og:description" content="ABC News channel provides around the clock coverage of
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="https://www.youtube.com/embed/W1ilCy6XrmI">
<meta property="og:video:secure_url" content="https://www.youtube.com/embed/W1ilCy6XrmI">
<meta property="og:video:type" content="text/html">
<meta property="og:video:width" content="640">
<meta property="og:video:height" content="360">
<meta property="og:video:tag" content="abc">
<meta property="og:video:tag" content="abc news">
<meta property="og:video:tag" content="australia">
<meta property="og:video:tag" content="news channel">
<meta property="og:video:tag" content="livestream">
<meta property="og:video:tag" content="breaking">
<meta property="og:video:tag" content="breaking news">
<meta property="og:video:tag" content="news">
<meta property="og:video:tag" content="rolling">
<meta property="og:video:tag" content="stream">
当视频 link 在 Reddit 上发布时,他们将阅读 HTML 来源并收集信息,例如页面标题、图像预览、视频嵌入 URL等,