我在我的頁面上有一個Facebook按鈕。它調用一個共享彈出窗口。Facebook分享彈出式按鈕停止工作後第一次點擊
問題是該按鈕只在第一次點擊時工作。第二次,第三次點擊不會做任何事情。我總是需要刷新頁面。
我是新手。你能幫我解決這個問題嗎?
謝謝。
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'zzzzzzzzzz',
status : true,
cookie : true,
xfbml : true
});
FB.ui(
{
method: 'feed',
name: 'Bitcoin Catcher Faucet & Rotator',
link: 'http://bitcoin-catcher.com',
picture: 'http://bitcoin-catcher.com/wp-content/uploads/2015/08/icon.png',
caption: 'Only 1000+ Rewards Faucet & Rotator',
description: 'Earn FREE Bitcoins Easier & Faster! Only 1000+ Rewards per Claim!'
},
function(response) {
if (response && response.post_id) {
unhide('claim', '');
} else {
}
}
);
};
function fb_callout() {
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
}
</script>
<img alt="Share on Facebook" src="http://bitcoin-catcher.com/wp-content/uploads/2015/09/facebook-share-button.png" width="180" onclick="fb_callout();" style="cursor: pointer;" />
Marekful。我確實通過這種方式更改了代碼,但沒有成功。這次第一次點擊也停止了。你能舉一個代碼的例子嗎? – Rafael
請看看我現在發佈的新代碼... – Rafael
只要在我的答案中這樣做。仔細看一下。你仍然把所有的東西放在fb_callout函數中;) – marekful