0
我的代码:为什么不是与jquery/fb js共享按钮出现?
<!DOCTYPE html>
<html lang="en">
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$.ajaxSetup({ cache: true });
$.getScript('//connect.facebook.net/en_UK/all.js');
});
</script>
</head>
<body>
<div class="fb-share-button" data-href="https://www.google.com/" data-layout="button_count"></div></p>
</body>
</html>
一个演示:
http://www.frostjedi.com/terra/scripts/demo/fb1.html
份额按钮并未显示和IDK的原因。有任何想法吗?
的代码是基于关闭的https://developers.facebook.com/docs/javascript/howto/jquery除了API密钥不被设置(虽然我不想象应该有所作为)
使用https://developers.facebook.com/docs/plugins/share-button – 2014-10-05 17:04:06
我维托里诺同意。不要为此使用jquery,只需使用他发布的链接中生成的代码即可。 – luschn 2014-10-05 17:18:32
它不起作用,因为你没有调用FB.init – WizKid 2014-10-06 03:02:28