function getUser()
{
FB.api(\'/me\', function(response) {
console.log(\'Response is \'+response);
alert(\'Your name is \' + response.first_name);
Use Jquery get Json method isted using pure javascript,
I used this library to get the date formatted, https://github.com/datejs/Datejs
$.getJSON("https://graph.facebook.com/5973249561/events/?access_token=YOUR_ACCESS_TOKEN&fields=id,name,description,start_time,place,cover,end_time&limit=4",
function(result){
for(x = 0; x < result.data.length; x++) {
var id = result.data[x].id;
var name = result.data[x].name;
var cover = result.data[x].cover.source;
var date = new Date(result.data[x].start_time);
var place = result.data[x].place.name;
var day = date.toString('dd');
var month = date.toString('MMM');
var url = 'https://facebook.com/'+id;
var time = date.toString("hh:mm tt");
$("#evt").append(name);
}
});