Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Notifications 在我的网站上接收类似Facebook按钮的通知_Notifications_Facebook Like - Fatal编程技术网

Notifications 在我的网站上接收类似Facebook按钮的通知

Notifications 在我的网站上接收类似Facebook按钮的通知,notifications,facebook-like,Notifications,Facebook Like,当用户喜欢我博客上的帖子时,我正在尝试接收Facebook通知(在Facebook内) 我有以下代码,插件工作正常,但我不能得到通知,我不知道我做错了什么。以下是代码示例: <html lang="en"> <head> <meta charset=utf-8> <meta property="fb:admins" content="589865326" /> </head> <body> <div id="fb-r

当用户喜欢我博客上的帖子时,我正在尝试接收Facebook通知(在Facebook内)

我有以下代码,插件工作正常,但我不能得到通知,我不知道我做错了什么。以下是代码示例:

<html lang="en">
<head>
<meta charset=utf-8>
<meta property="fb:admins" content="589865326" />
</head>
<body>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=134951483245924&amp;xfbml=1"></script><fb:like notify="true" href="http://visualise.ca" send="true" layout="button_count" width="450" show_faces="false" colorscheme="dark" font=""></fb:like>

<script type="text/javascript">
window.fbAsyncInit = function() {
    FB.init({appId: '134951483245924', status: true, cookie: true, xfbml: true});
    FB.Event.subscribe('edge.create', function(href, widget) {
    // Do something, e.g. track the click on the "Like" button here
    });
};
(function() {
 var e = document.createElement('script');
 e.type = 'text/javascript';
 e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
 e.async = true;
 document.getElementById('fb-root').appendChild(e);
 }());
</script>
</body>
</html>

window.fbAsyninit=函数(){
init({appId:'134951483245924',状态:true,cookie:true,xfbml:true});
FB.Event.subscribe('edge.create',函数(href,小部件){
//做一些事情,例如,在此处跟踪“喜欢”按钮的点击
});
};
(功能(){
var e=document.createElement('script');
e、 类型='text/javascript';
e、 src=document.location.protocol+'//connect.facebook.net/en_US/all.js';
e、 异步=真;
document.getElementById('fb-root').appendChild(e);
}());
我错过了什么?非常感谢您的时间和帮助

FB.Event.subscribe('edge.create', function(href, widget) {
    // Do something, e.g. track the click on the "Like" button here
});

要获取“通知”(而不是Facebook通知,因为like按钮不存在这些通知),您可以在这里将AJAX返回到您的服务器,让某人喜欢该页面。

OK!所以不可能在网站上获得类似按钮的Facebook通知?所以这就是它不起作用的原因。。。我明白了,我浪费了太多时间去尝试