我试图在我的html页面上有一个facebook分享按钮。我在下面添加了我的代码并告知此代码是否存在任何问题。
enter code here
<html>
<head>
<script>
window.fbAsyncInit = function () {
FB.init({
appId: 'xxxxxxx',
xfbml: true,
version: 'v2.5'
});
};
(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/sdk.js#xfbml=1&version=v2.5";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
</head>
<body>
<div id="social" style="display:inline-block; padding-left: 10px">
<div class="fb-share-button" data- href="http://whatsyourexcuse.co/#!prettyPhoto" data-layout="button_count"/>
</div>
</body>
</html>