开放图协议 - og:movie with youtube link

发布于 2024-12-27 08:05:05 字数 1015 浏览 2 评论 0原文

想要的场景:

  • 人们通过 Facebook 链接到我的网站,
  • 会弹出打开的图形数据(名称、描述、缩略图等)(这有效)(这不起作用
  • 当您单击 YouTube 视频播放的缩略图时,

) Facebook 似乎知道有一个视频要播放,但不想播放。

我的代码:

<meta property="og:image" content="<url>" />
<meta property="og:site_name" content="<name>" />
<meta property="og:description" content="<description>" />
<meta property="og:video" content="http://www.youtube.com/v/S3_AwK3ujQI&fs=1" />
<meta property="og:video:width" content="560" />
<meta property="og:video:height" content="315" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<link rel="video_src" href="http://www.youtube.com/v/S3_AwK3ujQI&fs=1"  />
<meta name="video_type" content="application/x-shockwave-flash" />
<meta name="video_width" content="560" />
<meta name="video_height" content="315" />

似乎有什么问题?我在某处读到解决方案必须使用 SSL 做一些事情,但由于我链接到外部 YouTube 视频,情况不应该如此;或者是吗?

Wanted scenario:

  • people link to my website via Facebook
  • open graph data pops up (name, description, thumbnail, ...) (which works)
  • when you click the thumbnail a youtube video plays (which doesn't work)

Facebook seems to know that there is a video to be played, but doesn't want to go through with it.

My code:

<meta property="og:image" content="<url>" />
<meta property="og:site_name" content="<name>" />
<meta property="og:description" content="<description>" />
<meta property="og:video" content="http://www.youtube.com/v/S3_AwK3ujQI&fs=1" />
<meta property="og:video:width" content="560" />
<meta property="og:video:height" content="315" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<link rel="video_src" href="http://www.youtube.com/v/S3_AwK3ujQI&fs=1"  />
<meta name="video_type" content="application/x-shockwave-flash" />
<meta name="video_width" content="560" />
<meta name="video_height" content="315" />

What seems to be wrong? I read somewhere that the solution has to do something with SSL, but since I link to a external YouTube video that shouldn't be the case; or is it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相对绾红妆 2025-01-03 08:05:05

您还需要一张 og:图片。使用 https 作为视频 URL 可以让拥有 Facebook 安全帐户的用户播放该视频。转到 YouTube 页面并查看他们使用的 og 标签。

You also need an og:picture. Using https for the video url will let it play for people who have Facebook on secure. Go to a youtube page and check out what they're using for og tags.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文