0
Good morning,
I’m implementing the Facebook Api, but I need it to bring me beyond the photo and description of the publication, the date of publication(Day and Month).
Has anyone ever done or know, that can help me how? Grateful!
@@Edit
The API already brings me the date information, with created_time!
then within 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. Inside the for, to get all the posts on 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.
Is getting via
/me/posts
? Unless mistaken it already returns thecreated_time
– Inkeliz
Really, it already brings me the created_time, already managed to solve, thank you very much! <3
– Willian Tártaro