Cu un js ca asta :
<script>
window.fbAsyncInit = function () {
FB.init({ appId: 'YOUR_APP_ID',
status: true,
cookie: true,
xfbml: true
});
FB.Event.subscribe('comment.create',
function (response) {
//Send an email with ajax
$.ajax({
type: "POST",
url: "sendcommentemail.php?",
data: "urlofpage=",
beforeSend: function () {$('#loading').show();},
success: function (html) {$('#loading').hide();},
error: function (html) {}
});
}
);
};
(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/en_US/all.js#xfbml=1&appId=YOUR_APP_ID";
fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));
</script>
dupa fiecare comentariu va fi apelata pagina sendcommentemail.php cu parametru url paginii unde a fost comentariul.
Pagina sendcommentemail.php poate sa-ti trimita de exemplu un email sau ce alta forma de notificare vrei tu.



Răspunde cu citat