【发布时间】:2016-01-17 05:17:39
【问题描述】:
是否可以构建网站的og 元标记,以便在将网站链接共享到 facebook 时,预览图像(gif)自动生成动画?
Here & here 讨论了 Giphy 是如何实现它的,基本上是将 gif 包装在一个 swf 文件中。但现在是 2016 年,有没有更好(和受支持)的方法来实现这一目标?我在 facebook 文档中找不到任何内容,我想将我的 og:type 元标记保留为具有 website 的值。
这是我的元标记配置对象的 sn-p(我使用 React Helmet 填充标记):
{ property: 'fb:app_id', content: 'some_app_id' },
{ property: 'og:description', content: 'My site's description' },
{ property: 'og:image', content: 'http://example.com' },
{ property: 'og:image:type', content: 'image/gif' },
{ property: 'og:title', content: 'My Site' },
{ property: 'og:url', content: 'http://example.com' },
{ property: 'og:type', content: 'website' },
{ property: 'og:image:width', content: '657' },
{ property: 'og:image:height', content: '411' },
{ charset: 'utf-8' },
{ property: 'og:site_name', content: 'My Site' },
{ property: 'og:locale', content: 'en_US' },
【问题讨论】:
标签: javascript facebook facebook-graph-api facebook-opengraph