Time for action –implementing the SDK
The SDK source files have already been downloaded and copied into the Visualizer project directory; find them in \src\com\facebook\
. (For information on downloading the latest version of the SDK and including it in your own project, refer to Chapter 1.)
We're going to build another Requestor, but this time it'll be powered by the SDK, rather than by our own URLRequest
. Start by creating a new folder in \src\apis\
called \sdk\
. Then, create a new file inside this folder called SDKRequestor.as
. Make it extend EventDispatcher
and implement IRequestor
, just like HTTPRequestor
.
Here's the basic code for that class:
package graph.apis.sdk
{ import flash.events.EventDispatcher; import flash.events.IEventDispatcher; ...
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.