【问题标题】:What is the appropriate og:video:type for an external (youtube) video?外部(youtube)视频的合适 og:video:type 是什么?
【发布时间】:2012-03-05 23:00:04
【问题描述】:

当 facebook "Like":ing 时,我想在元数据中附加一个 youtube 视频。我应该将 opengraph 类型设置为什么?

我在http://ogp.me 上找不到有用的答案,所以我去了这里。我得到的最接近的是how-to-post-an-youtube-video-link-through-facebook-graph-api,它非常相关,但更笼统,并且从未提及类型。

在使用 youtube 视频时可能没有类型是可以的?

【问题讨论】:

    标签: youtube facebook-like


    【解决方案1】:

    以下是 YouTube 使用其自己网站的 og 元数据的示例。使用他们的模式不会出错。

      <meta property="og:url" content="http://www.youtube.com/watch?v=Y4MnpzG5Sqc">
      <meta property="og:title" content="KONY 2012">
      <meta property="og:description" content="KONY 2012 is a film and campaign by Invisible Children that aims to make Joseph Kony famous, not to celebrate him, but to raise support for his arrest and se...">
      <meta property="og:type" content="video">
      <meta property="og:image" content="http://i2.ytimg.com/vi/Y4MnpzG5Sqc/hqdefault.jpg">
        <meta property="og:video" content="http://www.youtube.com/v/Y4MnpzG5Sqc?version=3&amp;autohide=1">
        <meta property="og:video:type" content="application/x-shockwave-flash">
        <meta property="og:video:width" content="398">
        <meta property="og:video:height" content="224">
      <meta property="og:site_name" content="YouTube">
    

    【讨论】:

    • 我想做类似的事情,即链接到 Facebook 中的网页,但也附上视频,但这似乎不起作用
    • 记住og:video:url is mandatory与对象关联的视频资源的URL
    猜你喜欢
    • 1970-01-01
    • 2016-09-27
    • 2013-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-21
    • 2015-06-22
    • 1970-01-01
    相关资源
    最近更新 更多