我使用Open Graph协议创建了一个视频链接。点击相似的按钮,链接出现在我的墙贴上。现在我要分享它,但它不是分享。
我生成视频链接的代码
`
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<title>Facebook Like Demo</title>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<meta property="fb:app_id" content="xxxxxxxxxxx" />
<meta property="og:title" content="title.." />
<meta property="og:description" content=" some description..." />
<meta property="og:type" content="video" />
<meta property="og:image" content="image url" />
<meta property="og:video" content="video url" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="400" />
<meta property="og:video:height" content="300" />
<meta property="og:site_name" content="test_app" />
</head>
<body>
<div id="fb-root">
</div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=xxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<fb:like href="link url" send="true" width="450"
show_faces="true">
</fb:like>
</body>
</html>
`
答案 0 :(得分:1)
我觉得Facebook的服务器在呼叫时没有正确看到URL。通过linter工具运行您的URL并修复它告诉您的任何警告和错误。 linter是:https://developers.facebook.com/tools/lint