【问题标题】:Blogger post with embedded YouTube video, linked and playable on facebook带有嵌入式 YouTube 视频的博客帖子,可在 Facebook 上链接和播放
【发布时间】:2013-12-11 19:55:21
【问题描述】:

在博客风格的博客上,前一天我可能在博客文章中有一张图片,第二天有一个 YouTube 视频,当将博客文章链接到 facebook 时,是否有可能让 facebook 找到并发布视频与在博客文章中查找图像的方式相同?

我见过其他人谈论“元标签”:

    <meta name="og:type" content="video"> // This is important so that OP will recognize your site as video streaming site like YouTube & Vimeo 
    <meta property="og:video:type" content="application/x-shockwave-flash"> // Don't Change this
    <meta property="og:video:width" content="Width in Pixels"> // player Width
    <meta property="og:video:height" content="Height in Pixels"> // Player Height
    <meta property="og:video" content="mySWFVideoPlayer.swf?url=Video_Soure"> // You will need to echo/print the Video Source (I.E. *.mp4) with a help of PHP or whatever your server uses

但元标记仅用于博客/网页的,所以这意味着我只能为整个博客设置 1 个视频,但我想使用每个帖子中嵌入的视频(如果嵌入视频)

【问题讨论】:

    标签: facebook blogger embedded-video


    【解决方案1】:

    对于嵌入的 YouTube 视频,试试这个。这可能会以某种方式帮助您。元标记在这种方式下非常有用。

    <meta name='og:title' content='Big Buck Bunny'/>
    <meta name='og:type' content='movie' />
    <meta name='og:url' content='http://testsite.com/testfile.html' /> //Your html meta tag file path
    <meta name='og:image' content='http://testsite.com/image.jpg' /> //Your image path
    <meta name='og:site_name' content='TestSITE'>
    <meta name='og:description' content='Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.'/>
    <meta property='og:video' content='http://testsite.com/jwplayer/player.swf?file=video.mp4' /> //Your video path with player
    <meta property='og:video:height' content='640'>
    <meta property='og:video:width' content='385'>
    <meta property='og:video:type' content='application/x-shockwave-flash' />
    <meta property='og:video' content='http://testsite.com/video.mp4' /> //Your Video
    <meta property='og:video:type' content='video/mp4' /> //Your Video Type for Mobile
    <meta property='og:video:type' content='text/html' /> //Video type for other
    

    【讨论】:

    • 元标签有效,但仅适用于全球网页,特别是博主,我只知道如何更新根网站的标题。因此,如果我使用此代码,每次我链接新博客文章时总是会引用相同的视频(而不是每个博客文章中的新视频),并且 facebook 会拒绝不在 中的元标记
    猜你喜欢
    • 1970-01-01
    • 2015-11-28
    • 2014-01-30
    • 1970-01-01
    • 2012-05-20
    • 2018-12-16
    • 1970-01-01
    • 1970-01-01
    • 2013-11-10
    相关资源
    最近更新 更多