Kod
<fb:comments href="" num_posts="5" width="320" ></fb:comments>
i jak prawidłowo odebrać callbacka z dodawania komentarza z tego boksa
mam coś takiego:
window.fbAsyncInit = function() { FB.init({appId: 'id_aplikacji', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('edge.create', function(response) { $.ajax({ url: "<?php echo lib_url::make('ajax')?>", timeoutNumber: 2000, type: 'POST', data: "url="+response+"&type=1" }); }); FB.Event.subscribe('edge.remove', function(response) { $.ajax({ url: "<?php echo lib_url::make('ajax')?>", timeoutNumber: 2000, type: 'POST', data: "url="+response+"&type=2" }); }); FB.Event.subscribe('comment.create', function(response) { $.ajax({ url: "<?php echo lib_url::make('ajax')?>", timeoutNumber: 2000, type: 'POST', data: "url="+response+"&type=3" }); }); FB.Event.subscribe('comment.remove', function(response) { $.ajax({ url: "<?php echo lib_url::make('ajax')?>", timeoutNumber: 2000, type: 'POST', data: "url="+response+"&type=4" }); }); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/pl_PL/all.js'; document.getElementById('fb-root').appendChild(e); }());
Odbiór like działa poprawnie, tak samo usunięcie like, ale nie mogę złapać dodania komentarza/skasowania go