我正在从Facebook实施社交插件,它似乎适用于所有浏览器除了PC上的Chrome 。
我用了code from facebooks site
我还添加了<html xmlns:fb="http://www.facebook.com/2008/fbml">
并添加了window.onload = function() {
FB.xfbml.parse();
}
继承人我所拥有的:
<!DOCTYPE HTML>
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta charset="UTF-8">
<title></title>
</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=306********4607";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
window.onload = function() {
FB.xfbml.parse();
}
</script>
<div class="fb-send" data-href="http://example.com"></div>
</body>
</html>