Last week I searched a lot and tested different plugins to add facebook comments and like buttons. The one that I most liked was Plugin Total Facebook, it is easy and have good position settings.
Right now, the facebook does not notificate you about new comments or like that your post receives, so I decided to code this using Javascript SDK. I used the event interface to know when somebody Like or Comment on your publication.
A lot of my tests returned the FB object was inexistent (Uncaught ReferenceError: FB is not defined), the FB.init was already called (FB.init has already been called – this could indicate a problem) and other erros. So i modified the function fbsdk_includeWFC() to do the init async and add a function to be called when a “edge.create” (Like) event or “comment.create” (Comment) event are done.
[code lang=”php”]
function fbsdk_includeWFC(){
$wfcglb = get_option(‘wfc_global’);
echo ”
window.fbAsyncInit = function() { FB.init({ appId : '" . $wfcglb['appid'] . "', // App ID //channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // 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('comment.create', function (response) { jQuery.ajax({ url: 'test.html', //success: function (data) { alert(response.href); }, //error: function (data) { alert(response.href); } }); }); };
FB.Event.subscribe('edge.create', function (response) { jQuery.ajax({ url: 'test2.html', //success: function (data) { alert(response); }, //error: function (data) { alert(response); } }); }); };
(function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = '//connect.facebook.net/en_US/all.js'; ref.parentNode.insertBefore(js, ref); }(document));“;
echo ““;
}
[/code]
Now you can modified the “url” from ajax calls to call a php url and pass parameters, and with this parameters send you an e-mail for example.
Hope this is useful for you
Matheus
https://nkxutnlyla.wordpress.com
https://nkxutnlyla.wordpress.com
https://ksemfakmni.wordpress.com
Good post. I learn something totally new and challenging on sites I stumbleupon every day. It will always be useful to read articles from other writers and practice a little something from other web sites.
https://fanvuqkaud.wordpress.com
https://rqiemzolae.wordpress.com
https://ecbsmgtfya.wordpress.com
https://ecbsmgtfya.wordpress.com
https://spplbzdsvh.wordpress.com
https://spplbzdsvh.wordpress.com
https://sgvxqmbkaf.wordpress.com
https://scyhchvfkb.wordpress.com
https://jllbczbfhi.wordpress.com
https://jllbczbfhi.wordpress.com
https://jllbczbfhi.wordpress.com
https://mxxpjxvlwe.wordpress.com
https://tzvpbpffwr.wordpress.com
https://rzyagpqmfu.wordpress.com
https://rzyagpqmfu.wordpress.com
https://tntvgdepwl.wordpress.com
https://tkygkspzem.wordpress.com
https://wukuelmgsn.wordpress.com
https://wukuelmgsn.wordpress.com
https://wukuelmgsn.wordpress.com
https://fszzejcvcq.wordpress.com
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
http://perfectbuilding.ru/user/aliciagreen/
Nội dung phân tích quá chuẩn. Tiện thể góp vui với mọi người, tớ muốn chia sẻ
một trang cá cược đẳng cấp quốc tế mang tên NEW88.
Anh em muốn truy cập mượt mà không bị chặn thì hãy gõ ngay new88.energy nha các bác.
Tại new88.energy anh em sẽ được trải nghiệm hệ thống nạp rút siêu tốc độ.
Ai đang tìm sân chơi xanh chín thì ghé new88.energy đăng ký
trải nghiệm thử nhé. Chúc anh em rực rỡ.
Hi there to all, because I am really eager of reading this weblog’s post to be updated on a regular basis. It carries good material.
Hi to every body, it’s my first go to see of this website; this website carries remarkable and genuinely excellent stuff in favor of visitors.
Hello to all, how is everything, I think every one is getting more from this site, and your views are good in support of new viewers.