window.fbAsyncInit = function() { FB.init({appId: '342258175832180', 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 alert('You just liked '+href); $.ajax({ type: "GET", url: "inseru.php", data: "?autor=" + href, async: true }); } ); };
W insert.php mam prosty skrypt który dodaje rekord do bazy. On działa, bo testowałem. Ale po kliknięciu w "Lubię to" nic sie nie dzieje, pisze tylko "You just liked <link>" Ale nie dodaje rekordu, czemu?