これがうまくいかない理由を誰か教えてもらえますか?
サンプルページはこちら
http://totalcommunitycollegemove.com/post-438.html
window.fbAsyncInit = function() {
FB.init({appId: '194189377275548', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
function catchCommentAdd()
{
$.ajax({
type: "POST",
url: "ajaxCommentCount.php",
data: "id=<?php echo $_GET['id']; ?>&direction=up",
dataType: "json"
});
return true;
}
function catchCommentDelete()
{
$.ajax({
type: "POST",
url: "ajaxCommentCount.php",
data: "id=<?php echo $_GET['id']; ?>&direction=down",
dataType: "json"
});
return true;
}
FB.Event.subscribe('comments.create', function(response) {
alert(response);
catchCommentAdd();
});