我正在使用 Facebook 的“赞”按钮并订阅两个事件:
edge.create - 当用户点击“Like”按钮时
comment.create - 当用户随后在出现的弹出窗口中键入评论时
edge.create 事件正在触发,但 comment.create 似乎没有发生。这是代码:
window.fbAsyncInit = function() {
FB.init({
appId : '1111111111111', // App ID
channelUrl : '//www.xxx.com/channel.php', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Event.subscribe('edge.create',
function(response) {
// user clicked facebook "like" button
alert("like");
}
);
FB.Event.subscribe('comment.create',
function(response) {
// user added comment to facebook like
alert("comment");
}
);
};
我错过了什么吗?
谢谢。-E