【问题标题】:Metas open graph to build share with animated gifMetas 开放图与动画 gif 建立共享
【发布时间】:2015-11-04 05:55:33
【问题描述】:

我正在尝试建立一个页面来分享动画 gif,就像 Giphy 所做的那样。

如果您共享此链接 (http://giphy.com/gifs/mQpZtX0gKDESA),您会看到共享图像变得可播放。需要注意的是,我不想分享 gif 的直接链接。我需要使用 gif 共享我的页面,并且共享需要显示可播放的 gif。

我已经尝试复制 Giphy 使用的所有元标记,但不走运。

如果有人对此有所了解,我将不胜感激。

感谢您的帮助。

【问题讨论】:

    标签: facebook share facebook-opengraph animated-gif giphy


    【解决方案1】:

    此功能目前尚未公开发布。这是一个测试版功能,正在一些网站上进行测试,但不公开。当这种情况发生时,它也会反映在公共文档中。

    【讨论】:

    • 感谢@Roemer 的评论。
    【解决方案2】:

    目前,仍然可以使用 .SWF 容器像视频一样显示 GIF 动画。如果您制作这样的 Flash 容器,您可以使用它来显示动画 GIF。

    容器应该是参数化的,所以你不要硬编码图片链接。读取Flash中的参数,加载GIF图片并显示。

    使用完 Flash 后,在浏览器中打开脚本链接(类似于下图) - 它应该会显示动画图像。

    http://website.com/container.swf?url=http://website.com/animated.gif

    最后,在您的 HTML 中为 Facebook 填写这些元标记:

    <meta property="og:type" content="movie">
    <meta property="og:video" content="http://website.com/container.swf?url=http://website.com/animated.gif" />
    <meta property="og:video:secure_url" content="https://website.com/container.swf?url=http://website.com/animated.gif" />
    <meta property="og:image" content="http://website.com/front.jpg"/>
    <meta property="og:image:width" content="640" />
    <meta property="og:image:height" content="480" />
    <meta property="og:video:width" content="640" />
    <meta property="og:video:height" content="480" />
    <meta property="og:video:type" content="application/x-shockwave-flash" />
    

    【讨论】:

    • 您能详细说明一下吗?那个容器里应该有什么?硬币容器本身可以是 Flash 动画吗?
    • SWF 应该包含一个带有 URLLoader 的简单脚本,该脚本将 url 参数中引用的 gif 放到舞台上。
    猜你喜欢
    • 1970-01-01
    • 2014-02-19
    • 1970-01-01
    • 1970-01-01
    • 2015-11-29
    • 1970-01-01
    • 2011-11-14
    • 1970-01-01
    • 2014-12-24
    相关资源
    最近更新 更多