1
當用戶尚未登錄到Facebook或該頁面已有評論時,代碼正確執行;然而,當用戶已經登錄,並且將第一評論,comment.create和comment.remove平時不火:Facebook Comments Plugin:comment.create和comment.remove不適用於登錄用戶
<div id="fb-root"></div>
<script type="text/javascript">
<!--
window.fbAsyncInit = function() {
FB.init({appId: 'FACBOOKAPPID', oauth: true, status: true, cookie: true, xfbml: true});
FB.Event.subscribe('comment.create', function(response) {
alert(response.commentID);
});
FB.Event.subscribe('comment.remove', function(response) {
alert(response.commentID);
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js#xfbml=1';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
//-->
</script>
<fb:comments href="URL" num_posts="1" width="500"></fb:comments>
建議?