Giphy如何分享gif? (2015,NOT FLASH ANYMORE) [英] How does Giphy share gifs to facebook? (2015, NOT FLASH ANYMORE)

查看:117
本文介绍了Giphy如何分享gif? (2015,NOT FLASH ANYMORE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我将以下URL粘贴到Facebook中,我可以共享一个动画GIF。这不是电影而不是Flash,Facebook 现在支持gifs 没有这些解决方法。我可以点击它暂停,并在暂停时在一个圆圈中显示GIF。

If I paste the following URL into Facebook I can share an animated gif. It's not a movie and not flash, Facebook now supports gifs without those workarounds. I can click it to pause and it shows "GIF" in a circle while paused.

http://giphy.com/gifs/hot-funny-cartoon-fBEDuhnVCiP16

无论我从哪个复制页面的元标记我无法让Facebook分享我自己的页面上的动画GIF表单。我甚至已经复制了该页面的整个代码并自动提供(更改< link rel =canonical

No matter what I replicate from that page's meta tags I cannot get Facebook to share an animated gif form my own page. I've even gone so far as to copy the entire code of that page and serve it myself (Changing <link rel="canonical" and <meta property="og:url" to match my url).

打开图形对象调试器为真正的Giphy页面和我的副本提供了相同的结果。有趣的是,对象调试器中的预览是两个页面的旧风格的Flash影片。然而,当我将Giphy url粘贴到我的Facebook中时,会显示gif - 我的relica显示Flash。

Open Graph Object Debugger gives identical results for both the real Giphy page and my replica. Interestingly, the preview in Object Debugger is the old style Flash movie for both pages. However, when I paste the Giphy url into my Facebook it shows the gif - my relica shows the Flash.

Giphy是否从Facebook获得特殊待遇?我需要做一些不同的事情吗?

Do Giphy get some special treatment from Facebook? Do I need to do something different?

推荐答案

我能够创建一个.html文件,当链接被粘贴为一个状态,在Facebook Feed中显示为动画(和循环)GIF。在我的html页面中,我在标题中使用以下元标记:

I was able to create an .html file which, when the link is pasted as a status, displays as an animating (and looping) GIF in the Facebook feed. In my html page, I use the following meta tags in the 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">

当我工作时给我的麻烦的是$ code :url 属性。它应该直接指向GIF,而不是这些元标记的一部分的.html文件。另外, og:image 应该与 og:url 相同。

The thing that gave me trouble when I was working on this was the og:url property. It should point directly to the GIF, not the .html file that these meta tags are a part of. Also, og:image should be the same as og:url.

我没有测试是否需要width和height属性。

I didn't test if the width and height properties are required.

这篇关于Giphy如何分享gif? (2015,NOT FLASH ANYMORE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆