April 06, 2012

Getting the “Access Token” for a Facebook Widget

Facebook widgets can display updates from a Facebook page right on your website. Need one for your site? Contact New Media for assistance.  One of the key components of the widget is called an access token. We will need to go to Facebook to create that for us.

Facebook widgets can display updates from a Facebook page right on your website. Need one for your site? Contact New Media for assistance.  One of the key components of the widget is called an access token. We will need to go to Facebook to create that for us. (And with many tokens expiring automatically, these will have to be refreshed, and therefore managed by someone.)

  1. For each widget, you’ll need to create a unique app in Facebook, here: https://developers.facebook.com/apps. The settings do not matter much; all you need to get is that App ID [API key] and App Secret.
  2. Once you get the App ID and Secret, you will also need to ensure that it does not expire (by default, they refresh every 30 days or so). To do that, click on “Edit App” in the upper right of your app’s page. Then, you’ll click on the advanced settings from the left-hand menu. There, you will find an option under “migrations” for “Deprecate offline access.” Make sure that is enabled. 
  3. You’ll also need the ID number of the username of whose wall you want to display. That can be found in the URL of the page (if they’ve created a unique URL, then click on “Edit Page,” and you’ll see the URL there). For example, a URL looks like this: https://www.facebook.com/pages/edit/?id=359858350733706.
  4. In the LiveWhale widget maker: For the access token, you’ll need to put the unique Facebook App ID [API Key] and the App Secret in this form (separated by a vertical “pipe” bar). For example:
    359858350733706|e0430f605bfb3a5646422d9295727bd7

Source: https://www.lclark.edu/live/news/15918-getting-the-access-token-for-a-facebook-widget