Twitter Player卡无效的动画GIF?

时间:2015-05-04 05:55:05

标签: php html css twitter-bootstrap twitter

我正在尝试使用播放器卡设置动画GIF。但是当我测试我的玩家卡https://cards-dev.twitter.com/validator时,它不会显示动画GIF。

这是我的玩家卡的元代码

<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta name="twitter:card" value="player">
<meta name="twitter:site" value="@uncleLaravel">
<meta name="twitter:title" value="domain.com">
<meta name="twitter:description" value="sample">
<meta name="twitter:image" value="http://domain.com/img/sample.gif">
<meta name="twitter:player" value="http://www.domain.com/container.html">

<meta name="twitter:player:width" value="320">
<meta name="twitter:player:height" value="320">
<meta name="twitter:domain" value="domain.com">

container.html

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
html, body{ margin: 0; padding: 0; overflow: hidden; }
img{ border: 0; }
</style>
</head>
<body>
    <img id="gif" src="/sample.gif" width="100%">
</body>
</html>

这里有什么问题吗?

1 个答案:

答案 0 :(得分:2)

您的示例是正确的,只需确保您的所有链接都是https。如果您动态生成卡片数据,请记住将Conetnt-Type设置为text / html。