The file getFBpageFeed.php makes a request to Facebook Graph to get the JSON data of a public Facebook page. Then it ECHO's it back (in this case to a method in getFacebookPosts.m).
getFacebookPosts.m has two methods, one that makes the call to the above .php file and another that writes and could parse the returned JSON data to a file.
- To get an app token you can read more about that here.
- More about Facebook's SDK for PHP here.
- Use Facebook's Graph API Explorer to get a good idea of the data being returned so you can parse it easliy later on.