开放图协议 - og:movie with youtube link
想要的场景:
- 人们通过 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您还需要一张 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.