- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如果我将以下 URL 粘贴到 Facebook,我可以分享一个动画 gif。这不是电影也不是 Flash,Facebook now supports gifs没有这些解决方法。我可以点击它暂停,暂停时它会在一个圆圈中显示“GIF”。
http://giphy.com/gifs/hot-funny-cartoon-fBEDuhnVCiP16
无论我从该页面的元标记中复制什么,我都无法让 Facebook 从我自己的页面共享动画 gif。我什至复制了该页面的整个代码并自己提供服务(更改 <link rel="canonical"
和 <meta property="og:url"
以匹配我的 url)。
Open Graph Object Debugger为真正的 Giphy 页面和我的副本提供相同的结果。有趣的是,对象调试器中的预览是两个页面的旧式 Flash 影片。然而,当我将 Giphy url 粘贴到我的 Facebook 时,它显示了 gif - 我的 relica 显示了 Flash。
Giphy 是否从 Facebook 得到一些特殊待遇?我需要做一些不同的事情吗?
最佳答案
我能够创建一个 .html 文件,当链接作为状态粘贴时,它在 Facebook 提要中显示为动画(和循环)GIF。在我的 html 页面中,我在 header 中使用了以下元标记:
<meta property="og:site_name" content="Site Name">
<meta property="og:url" content="url to GIF on web">
<meta property="og:title" content="Title of GIF page">
<meta property="og:description" content="Some description">
<meta property="og:type" content="video.other">
<meta property="og:image" content="Same as og:url above">
<meta property="og:image:width" content="800">
<meta property="og:image:height" content="400">
当我处理这个问题时给我带来麻烦的是 og:url
属性。它应该直接指向 GIF,而不是这些元标记所属的 .html 文件。此外,og:image
应与 og:url
相同。
我没有测试是否需要 width 和 height 属性。
关于facebook - Giphy如何将动图分享到facebook? (2015 年,不再闪光),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31216481/
我是一名优秀的程序员,十分优秀!