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