打开图表og:视频元标签内容 [英] Open graph og:video Meta Tags content

查看:109
本文介绍了打开图表og:视频元标签内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个页面,当Facebook被共享/喜欢时,该页面可以被Facebook正确刮取。该页面将与其相关联的YouTube视频,因此在og:video标签的内容属性中,应该将YouTube视频嵌入链接或实际的YouTube页面链接显示在Facebook上,同时点击预览按钮在Facebook上播放视频?

I'm trying to set up a page which can be properly scraped by Facebook when it's shared/liked. The page will have a YouTube video associated with it, so in the content attribute of the og:video tag, should I put the YouTube video embed link or the actual youtube page link for it to appear on Facebook with the little "Preview" button that plays the video in Facebook?

希望有人可以帮助!谢谢!

Hope someone can help! Thanks!

推荐答案

我想出来了。我看了一下Collegehumor.com的做法,他们包括一些Facebook API中没有提及的东西。而不仅仅是以下内容:

I figured it out. I had a look at how Collegehumor.com does it and they include a bunch of stuff not mentioned in the Facebook API. Rather than just the following:

<meta name="og:video" content="whatever"></meta>
<meta name="video_style" content="whatever"></meta>
<meta name="video_height" content="whatever"></meta>
<meta name="video_width" content="whatever"></meta>

您还需要链接rel =video_src它有助于有 videothumbnail og:image - 我不完全确定哪一个,但是你去了这样做:)

you also need link rel="video_src" and it helps to have videothumbnail and og:image too - I'm not entirely sure which one did it but there you go. That works :)

这篇关于打开图表og:视频元标签内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆