var response = [{
id: 1,
user_id: 2,
result: 'test',
date_time: '123'
}],
trHTML = '';
$.each(response, function (i, x) {
trHTML += '<tr>'
for (res in x) {
trHTML += '<td>' + x[res] + '</td>';
}
trHTML += '</tr>';
});
$('table').append(trHTML);
var page_like_or_unlike_callback = function(url, html_element) {
console.log("page_like_or_unlike_callback");
console.log(url);
console.log(html_element);
}
// In your onload handler
FB.Event.subscribe('edge.create', page_like_or_unlike_callback);
FB.Event.subscribe('edge.remove', page_like_or_unlike_callback);
FB.Event.subscribe('edge.create', function(url, html_element) {
var FBbox = document.querySelectorAll(".fb-page");
FBbox.style.display = 'none';
});