I am trying to get my notifications for the pasts days. I was able to do it until recently when I started to follow more pages. Now, instead of giving me the notifications data, it only gives me the number of unseen. Here is my code:
var start=parseInt(moment().add(-5,'day').format('X'));
var end=parseInt(moment().add(-1,'day').format('X'));
FB.api('me/notifications', { fields: ['id', 'object.id','unread'],include_read:true,since:start,until:end,limit:10000 }, function(res) {
if(!res || res.error) {
return callback(new Error(!res ? 'error occurred' : res.error));
}
console.log(res); }
Here is the output.
{ data: [], summary: { unseen_count: 8, updated_time:
'2014-08-15T00:30:46+0000' } }
Additionally, if I try to type a query with the parameter until in the graph explorer that is older than today I won't receive any data.
Any suggestion?