How To: Facebook Access Token

A quick and pain-free guide to getting an authentication token for Facebook data retrieval.

Subject Matter


June 23, 2011

Facebook Tweet

I’m a big fan of the Facebook Graph API. It’s easy to use and well documented. Recently, the facebook feeds on a few of our client sites went down. Upon investigation, it appears that Facebook has changed the way data can be accessed through their API. Feed data can now only be retrieved using an authentication token. The process was relatively simple to set up, but not immediately straightforward.

Here’s what you need to do in order to get an authentication token:

  1. Go to, login to your facebook account, and add the developer app, if requested.
  2. Click the ‘add a new app’ button to create a new app.
  3. Give the app a name, keeping in mind facebook’s naming policies.
  4. After creating the app, you should end up at an admin panel with your new app information ready.  Go to replacing APP_ID with your newly created app ID and APP_SECRET with your new app Secret, both of which are displayed on the application administration panel.  If the credentials are correct, you will see your authentication token at that location.
  5. This token can now be used in order to retrieve data from a feed.  For example:, replace PAGE_OR_USER_ACCOUNT with the page id or user account name and ACCESS_TOKEN with the token you retrieved in step 4.

It’s that easy!

A few things to note:

  • Your access token will change periodically, implying your Facebook data retrieval method will need to dynamically retrieve the access code from Facebook using the method in step 4.
  • Facebook Apps can be url specific, or you can leave those fields blank and use this authentication method to retrieve public data from Facebook from multiple urls.

Visit to see how we recently implemented a Facebook feed into a client’s site design.