My requirement/objective:
I'm retrieving Facebook posts for the past 3 months from a public page, and I would like to select only those posts which have been modified in the recent past (in the last 2 days).
I'm using httr R package, and using the GET function to accomplish the above.
I tried the following :
url.data <- GET(url, config(token=token), config(add_headers("If-Modified-Since" = "2016-09-08 11:45")))
url.data <- GET(url, config(token=token, add_headers("If-Modified-Since" = "2016-09-08 11:45"))
In the above 'url' has the 'since', 'until' fields specifying the time period (3 months) for which the posts need be retrieved. 'token' is the OAuth token for authentication.
In both of the above methods, all the posts are retrieved, rather than just the posts that are modified in the past 2 days.
Is there another way of passing the If-Modified-Since to GET which will result in only the desired posts to be retrieved?
Note: I have already checked these posts related to If-Modified-Since, and they do not answer my question :
- "If-Modified-Since" header
- "If-Modified-Since" Header?
- If modified since - HTTP protocol
- If-Modified-Since Date Format
and a few more questions which are not exactly related to my scenario.
Any help would be appreciated.