Time for action – requesting an access token with the browser

Open your browser and head to https://graph.facebook.com/oauth/authorize?client_id=«insert_application_id» (replace «insert_application_id» with your application's Application ID).

You'll get the following error:

{
   "error": {
      "type": "OAuthException",
      "message": "Missing redirect_uri parameter."
   }
}

Facebook won't just output the access token; it wants to redirect the browser to another web page, and pass the access token to that page. At the moment, this isn't very useful. Our Flash application is running as a standalone SWF and is not embedded in a page — so we'll use a quick workaround.

Registering a redirect URI with our application

Go to your application's Settings (go to http://www.facebook.com/developers ...

Get Facebook Graph API Development with Flash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.