Resources: Social Media
Generate a Facebook access token
7 June 2013
When building a social media feed, Facebook is the difficult one to work with as it uses higher-level API access. You can get away without using the API if you're happy with the low-res thumbnail graphics, but if you want nice, high res graphics you'll need to do the following:
- Register as an App Developer
http://developers.facebook.com/apps - Create an App
http://developers.facebook.com/apps - Generate an access_token
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials
- Use this access_token to construct your feed URL
https://graph.facebook.com/YOUR_PAGE_ID/feed?access_token=YOUR_ACCESS_TOKEN
You can now use your constructed URL to grab a JSON-formatted feed from your wall! Bear in mind cross-domain access limitations with javascript calls like this. Personally I digest the JSON feed using PHP functionality:
json_decode( get_file_contents(URL HERE), true)