Picking up the Date of publication by the facebook API

0

Good morning,

I'm implementing Facebook's APi, but I need it to bring me in addition to the photo and the description of the publication, the date of publication (Day and Month).

Someone already did or knows, who can help me how to do? Thanks!

@@ Edit

The API already brings me the date information, with created_time!

then inside Facebook.js

function dateByJsonToUTC(dateCurrent){
    var postDate = new Date(dateCurrent);
    var mes = postDate.getUTCMonth() + 1;
    var utcDate =   {
      'year' : postDate.getUTCFullYear(),
      'month' : postDate.getUTCMonth(),
      'mes' : transformDateNumberInDateString( postDate.getUTCMonth() + 1),
      'day' : postDate.getUTCDate(),
      'hour' : postDate.getUTCHours(),
      'minutes' : postDate.getUTCMinutes()
    }
    return utcDate;
}

where I am setting the date information. Within the for, to get all the posts of the page, I put: let date = dateByJsonToUTC( listPosts[i].created_time ); , where I can get the information I want from the date, for example date.day

    
asked by anonymous 19.04.2017 / 14:13

0 answers