Time for action – authorizing through AIR with the SDK

The Adobe ActionScript 3 SDK for Facebook Platform can also be used with AIR, if a few changes are made to your code. The biggest change required is the class used: we've used the com.facebook.graph.Facebook class throughout this book, but for AIR we must use com.facebook.graph.FacebookDesktop.

This has a few differences. Let's go through them. Again, these are general instructions, so implement them as best fits your project.

  1. It's easiest to start with the code we've already been using for SWF-based authentication, and modify it to work with AIR; there aren't too many differences. First, import the FacebookDesktop class.
    import com.facebook.graph.FacebookDesktop;
  2. Now, replace every reference ...

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.