Time for action – Using an access token in our Graph visualizer

Open the AS3 Visualizer project we started working on in the previous chapter. At the moment, it's set to load the URL https://graph.facebook.com/PacktPub. Let's make it load a user profile instead.

Modify CustomGraphContainerController.as to change which object is requested:

package controllers
{
  import graph.apis.http.HTTPRequestor;
  import graph.GraphRequest;
  import ui.GraphControlContainer;
  
  public class CustomGraphContainerController extends GCController
  {
    
    public function CustomGraphContainerController(a_graphControlContainer:GraphControlContainer)
    {
      super(a_graphControlContainer);
      _requestor = new HTTPRequestor();
      addEventListenersToRequestor();
 _requestor.request(new GraphRequest("your_user_id")); ...

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.