我正按照说明https://developers.facebook.com/docs/plugins/like-button尝试添加类似Facebook的按钮 但它不会显示。我甚至把代码放在一个空的html文档中,但它仍然无法正常工作。 任何帮助非常感谢,它让我发疯! 这是我的代码:
<!doctype html>
<html>
<head>
<title>facebook like</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</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_GB/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="https://mdolbear.com/" data-width="200" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>
</body>
</html>