The following code is inside a file called facebook_posts.php which I call from my index file like so:
I've found that the most voted solution is way too complicated and only lasts 2 months.
For me, this is the best solution using an App with Graph API 2.5:
1.- Create an App.
2.- Go to: https://developers.facebook.com/tools/explorer/
3.- Copy this "{ACCESS-TOKEN}" (is in the form: number|hash)
IMPORTANT: (This are not app_id|app_secret!!!)
4.- Query the URL with CURL:
(5).- Equivalent URL:
I've put all of this together in a very simple gist:
https://gist.github.com/biojazzard/740551af0455c528f8a9