For other nodes, such as Posts, I can easily retrieve the posts newer than the specified date via since
me/posts?fields=id,link,created_time&since=2017-05-23
{
"data": [
{
"id": "344993862351965_654017808116234",
"link": "http://www.news.com.au/world/europe/manchester-terrorist-wanted-maximum-carnage-british-pm-says/news-story/b47c5a33ac2c237b13ca31df4af84766",
"created_time": "2017-05-24T07:19:53+0000"
},
{
"id": "344993862351965_654008634783818",
"created_time": "2017-05-24T06:50:59+0000"
},
{
"id": "344993862351965_654007804783901",
"created_time": "2017-05-24T06:47:31+0000"
},
{
"id": "344993862351965_653995944785087",
"created_time": "2017-05-24T05:58:28+0000"
},
{
"id": "344993862351965_653991941452154",
"created_time": "2017-05-24T05:39:50+0000"
},
{
"id": "344993862351965_653572411494107",
"created_time": "2017-05-23T03:36:03+0000"
},
{
"id": "344993862351965_653537714830910",
"created_time": "2017-05-23T01:06:32+0000"
},
{
"id": "344993862351965_653536891497659",
"created_time": "2017-05-23T01:02:51+0000"
}
],
"paging": {
"cursors": {
"before": "Q2c4U1pXNTBYM0YxWlhKNVgzTjBiM0o1WDJsa0R5TXpORFE1T1RNNE5qSXpOVEU1TmpVNk9EWXdOelU1TlRRMU1EUTRPVEEyTmpVNE1BOE1ZAWEJwWDNOMGIzSjVYMmxrRHg4ek5EUTVPVE00TmpJek5URTVOalZAmTmpVME1ERTNPREE0TVRFMk1qTTBEd1IwYVcxbEJsa2xOQmtC",
"after": "Q2c4U1pXNTBYM0YxWlhKNVgzTjBiM0o1WDJsa0R5UXpORFE1T1RNNE5qSXpOVEU1TmpVNkxUUTFNekE0TXpBNE1EUTVNemN5TVRrNU1EY1BER0ZA3YVY5emRHOXllVjlwWkE4ZAk16UTBPVGt6T0RZAeU16VXhPVFkxWHpZAMU16VXpOamc1TVRRNU56WTFPUThFZAEdsdFpRWlpJNG83QVE9PQZDZD"
}
}
}
However, for Conversations, since
doesn’t work as expected, as you can see below (both of the results were created/updated older than 2017-05-23)
me/conversations?fields=id,link,messages&since=2017-05-23&limit=2
{
"data": [
{
"id": "t_mid.$cAAE5xQYTv8liRXo9xFcFDT0E7prs",
"link": "/PowerToYou2/manager/messages/?threadid=10154252071796525&folder=inbox",
"messages": {
"data": [
{
"id": "m_mid.$cAAE5xQYTv8liX8WWd1cLoBOBl1nb",
"created_time": "2017-05-22T04:52:59+0000"
},
{
"id": "m_mid.$cAAE5xQYTv8liUJT1Z1cH0-tTphzp",
"created_time": "2017-05-19T06:05:34+0000"
},
{
"id": "m_mid.$cAAE5xQYTv8liUJT0tlcH0-sDHM0e",
"created_time": "2017-05-19T06:05:34+0000"
},
{
"id": "m_mid.$cAAE5xQYTv8liRhbpE1cFNGgmoHRE",
"created_time": "2017-05-17T05:11:41+0000"
},
{
"id": "m_mid.$cAAE5xQYTv8liRe0p4lcFKfZ0lxol",
"created_time": "2017-05-17T04:26:05+0000"
},
{
"id": "m_mid.$cAAE5xQYTv8liRXo_TlcFDT2lzLiA",
"created_time": "2017-05-17T02:20:34+0000"
},
{
"id": "m_mid.$cAAE5xQYTv8liRXo9xFcFDT0E7prs",
"created_time": "2017-05-17T02:20:34+0000"
}
],
"paging": {
"cursors": {
"before": "QVFIUllZAb2dxNS1pcHBDR0NEbW5DSG1YeF9fNTFJejBaZAnlTMTFZAR0JodTV4bnR3cVdkb3BOS1hLd3ZAIbjhrQjFoMV9QRXhDMnJNM3o5YkR6VnlVQ3AyTUpSYWVNNjNYLUlMUzVlYVJWalExZAGxRR1JSd3JjUjREY3NSNHpJdTVzQndF",
"after": "QVFIUnFpQVlQam45a3owT3c1OHN3M2dlVmNBdWVSazRqUEJPUHo0eFNDSjFYaU5zNENyNm8zUW5mSWpydFpFeFJwTnI5cDA2cUI1ZAFcxZAHhtby1OVWhDcUlLV3UtUWV2OTl1NjZAIbW9kN2xjVDJsc25xUTBYVm9MVDN6OHpOR2ltREQ3"
}
}
}
},
{
"id": "t_mid.1431568583280:8fb19e247dd7f96b70",
"link": "/PowerToYou2/manager/messages/?threadid=101813436821767&folder=inbox",
"messages": {
"data": [
{
"id": "m_mid.$cAAE5xQeNcgFiUICvylcHztndTcyi",
"created_time": "2017-05-19T05:43:25+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiRVlSXFcFBQKOJ-GQ",
"created_time": "2017-05-17T01:44:36+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiRVlSDVcFBQJ4x664",
"created_time": "2017-05-17T01:44:36+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWqCH1b8CU5C0PsM",
"created_time": "2017-05-10T02:17:03+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWoYq1b8CTPLm2B0",
"created_time": "2017-05-10T02:16:36+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWmh21b8CRZEbhoS",
"created_time": "2017-05-10T02:16:05+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWlScFb8CQJmwmL6",
"created_time": "2017-05-10T02:15:45+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWlQJlb8CQHlvG5-",
"created_time": "2017-05-10T02:15:44+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWlLiFb8CQC-LmYc",
"created_time": "2017-05-10T02:15:43+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWk4-Vb8CPvwCeJz",
"created_time": "2017-05-10T02:15:39+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWkVslb8CPM4rnZ4",
"created_time": "2017-05-10T02:15:29+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWi_DVb8CN2AStE3",
"created_time": "2017-05-10T02:15:07+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWiBzlb8CM5t0o13",
"created_time": "2017-05-10T02:14:52+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIWiA_lb8CM39AMEr",
"created_time": "2017-05-10T02:14:51+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIVcrA1b8BHhpl4kK",
"created_time": "2017-05-10T01:55:55+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiIVcEg1b8BG1qtyg4",
"created_time": "2017-05-10T01:55:45+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiHDJz6Vb6u0rIpZhn",
"created_time": "2017-05-09T01:57:43+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFiHB3bu1b6tiTeNg_T",
"created_time": "2017-05-09T01:35:13+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh4zlcKFbsfQTOvDSo",
"created_time": "2017-04-28T00:26:54+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh4zYp41bsfDhjcpQl",
"created_time": "2017-04-28T00:23:25+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh4ytZkVbseYRPf5P-",
"created_time": "2017-04-28T00:11:36+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh4ym_SlbseR2uaJbr",
"created_time": "2017-04-28T00:09:51+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh3iXOyFbrOCGdgtC1",
"created_time": "2017-04-27T00:47:27+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh3iAp_FbrNrh4EVyC",
"created_time": "2017-04-27T00:41:17+0000"
},
{
"id": "m_mid.$cAAE5xQeNcgFh3iApklbrNrgvnUJA",
"created_time": "2017-04-27T00:41:17+0000"
}
],
"paging": {
"cursors": {
"before": "QVFIUmFNLW5DMEFSUXpGVEM1RVNXd2RiQXlaejA5VGdVWHdMWUVKLVRZAZAlB2MC11M3NGUGhlanF4TEJlT1NJeUR6SDB0NjN4U2tfMXpvRnlXX01ONGRYMXRnMmFVR1dkd2xwdTZAneFlwNGp2QjRJR1VqZAjE0QlIxNC1DejdKQkRIY3E5",
"after": "QVFIUkgyV2RZAOXlKM3FwSG9iZAVNNX01tY282LWFiclZAieHNac1ZA0TmpuREo4UzJ0enNOZA05QRW4xaDQ3UVc0VGttY1RnWXFKTUYyXzRXRklGZA2lsWVdYWWs0Q3ZABYWp2UzJIOUFFczJOTWlrY1BySi1CM0VQRnBZAR2VkbTdITVdMVkVy"
},
"next": "https://graph.facebook.com/v2.9/t_mid.1431568583280:8fb19e247dd7f96b70/messages?access_token=EAACEdEose0cBAIRioxeAWt3en2ZBQqKKy3X8BgPkxk86YZBoRMKFFRgRCEsMxV9g4WZAUMtddovO4aLyjytSFZBELWIfBChD4ZALKRs0kowEl3MLJ9TIbqOZB3Ggt6SGX5pCA1xSZB8fGgRUi2qxGtedFzlR0UZCG5p9wgZBTtrL07CqZA02PvT2SFsxTd12PQx3sZD&pretty=0&limit=25&after=QVFIUkgyV2RZAOXlKM3FwSG9iZAVNNX01tY282LWFiclZAieHNac1ZA0TmpuREo4UzJ0enNOZA05QRW4xaDQ3UVc0VGttY1RnWXFKTUYyXzRXRklGZA2lsWVdYWWs0Q3ZABYWp2UzJIOUFFczJOTWlrY1BySi1CM0VQRnBZAR2VkbTdITVdMVkVy"
}
}
}
],
"paging": {
"cursors": {
"before": "QVFIUjJXamlwVXZAlS2tiMW1lVWIzQXpJWFlmeDNwdnBjenVxZAU11R3FMYTRmUkFuUHJya0tnbEczbV8yTzlGSndXa0RSdFVLUjU0d1RzTVRhN1k4TjM2TE0tNDBXNUZA0VGk3Qm9xX3gtSEFvZAUxvSEMwMXN5LTAxNkpsN3lmRmtPZAHR3",
"after": "QVFIUnFUdmZAscEprU1AzNjJ1U3VkVTZAZAdFlCaVZAhNktkRkM2aHkzVkRYN0oyWXZAkaUhRMVcwUDFHLVlDQi15bmlvcFNLNFBReTRQN3AwbFlZAQi03U2ZASYXJuRmh3QlZAuTlB1V1FtS0hCRWRwRlcyX3FxYllETlhQQmltM0FuQVAtSWVt"
},
"next": "https://graph.facebook.com/v2.9/344993862351965/conversations?access_token=EAACEdEose0cBAIRioxeAWt3en2ZBQqKKy3X8BgPkxk86YZBoRMKFFRgRCEsMxV9g4WZAUMtddovO4aLyjytSFZBELWIfBChD4ZALKRs0kowEl3MLJ9TIbqOZB3Ggt6SGX5pCA1xSZB8fGgRUi2qxGtedFzlR0UZCG5p9wgZBTtrL07CqZA02PvT2SFsxTd12PQx3sZD&pretty=0&fields=id%2Clink%2Cmessages&limit=2&after=QVFIUnFUdmZAscEprU1AzNjJ1U3VkVTZAZAdFlCaVZAhNktkRkM2aHkzVkRYN0oyWXZAkaUhRMVcwUDFHLVlDQi15bmlvcFNLNFBReTRQN3AwbFlZAQi03U2ZASYXJuRmh3QlZAuTlB1V1FtS0hCRWRwRlcyX3FxYllETlhQQmltM0FuQVAtSWVt"
}
}
According to the Facebook documentation, I believe all nodes should support time-based pagination, but only conversations
and messages
don’t work as supposed.
I don’t want to fetch the private messages and manually check the updated time to filter out the old messages because all of other nodes use since
to filter the results and also, manually filtering the results is not a long-term solution.
Any alternatives for fetching Facebook messages by specified date?
2
Answers
Apparently there is a bug regarding this issue and is also been reported.
Your can see the link here: https://developers.facebook.com/bugs/420363721670492/
Hope it get fixed soon.
Facebook removed it. They told that in this bug report.
I think we should develop a new way to grab only new conversations/message (best pratices) in facebook without having to fetch all data every time.