我从facebook页面放了一个iframe,我把javascript代码允许你点击后启动提醒
FB.Event.subscribe('edge.create', function(response) {
alert('ora segui aggiornamenti: ' + response);
});
FB.Event.subscribe('edge.remove', function(response) {
alert('Non segui gli aggiornamenti: ' + response);
});
};
有一个类似的功能,允许我们在点击订阅按钮后运行一个函数吗?
此页面的完整代码
< html >
< head >
< script >
window.fbAsyncInit = function() {
FB.init({
appId: '1664052443882672',
xfbml: true,
version: 'v2.5'
});
FB.Event.subscribe('edge.create', function(response) {
alert('ora segui aggiornamenti: ' + response);
});
FB.Event.subscribe('edge.remove', function(response) {
alert('Non segui gli aggiornamenti: ' + response);
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/us_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk')); < /script>
</head >
< body >
< div class = "fb-page"
data - tabs = "events"
data - href = "https://www.facebook.com/RoyalDream8"
data - width = "2000"
data - action = "subscribe"
data - hide - cover = "false" > < /div>
</body >
< /html>
答案 0 :(得分:0)
您可以在Facebook文档中查看所有现有事件:https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
截至目前,没有事件发生。