Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get posts from a Facebook page by date

Facebook Page is a useful channel for us to study something. But I have a problem in filter its posts by date: get all posts by a specified date. The old posts are floated.

Is there any Facebook API supporting to do this task?

like image 848
Tung Avatar asked Oct 15 '13 23:10

Tung


People also ask

How do I search for a post on a Facebook page by date?

Tap Categories, then select the category you'd like to review. Date. Tap Date, then select the Start Date and End Date that you'd like to see content for. Then tap Done in the top right.

How do I go to a specific date on a Facebook business page?

Click. in the top right of the post. Select Change Date. Choose the year, month, date and hour where you want the post to appear on your Page's timeline.

Can you sort Facebook posts by date?

When you load up Facebook on your browser, go to the sidebar on the left-hand side of the page. Scroll down until you see "most recent" and click it — this will set your feed to chronological order.


1 Answers

You can use the parameters since and until in conjuntion with strtotime

strtotime(); reference: http://php.net/manual/en/function.strtotime.php

Example of usage using Graph API Explorer.

// example will return first 20 posts made between 15th of March, and 5th of April 2013.
example.com/feed?since=15+march+2013&until=5+april+2013&limit=20

Live example:

https://developers.facebook.com/tools/explorer/135669679827333/?method=GET&path=shawndageek%2Ffeed%3Fsince%3D1%20january%202015%26until%3Dnow%26limit%3D20&version=v2.5

Additional info:

  • Post objects return with most recent first, so if an older post is not showing you may need to close the date gap or increase the limit=
like image 101
ShawnDaGeek Avatar answered Nov 15 '22 12:11

ShawnDaGeek