【发布时间】:2012-05-04 19:02:08
【问题描述】:
我正在使用 Facebook 的“赞”按钮和subscribing to two events:
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
【问题讨论】:
标签: facebook facebook-graph-api facebook-like facebook-opengraph