Packagecom.myflashlab.air.extensions.facebook.access
Classpublic class Graph
InheritanceGraph Inheritance flash.events.EventDispatcher

When your users login to your app successfully, you can use this class to call the facebook graph API. note that you you must not initialize this class directly. instead use FB.graph to access the graph. to know how the graph calls should look like, read https://developers.facebook.com/docs/graph-api/reference

You still can access the graph if your user is not logged in, but you will be able to call on public commands only.

View the examples



Public Methods
 MethodDefined By
  
call($url:String, $urlRequestMethod:String, $urlVariables:URLVariables):void
Use this method to request for information from Facebook graph API read here for detailed information about how you should use the graph: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.8
Graph
Method Detail
call()method
public function call($url:String, $urlRequestMethod:String, $urlVariables:URLVariables):void

Use this method to request for information from Facebook graph API

read here for detailed information about how you should use the graph: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.8

Parameters

$url:String — The address on the graph which you wish to connect to, for example https://graph.facebook.com/v2.8/me
 
$urlRequestMethod:String — can be URLRequestMethod.GET for example
 
$urlVariables:URLVariables — can be new URLVariables("fields=name,email,picture&metadata=0") for example

Examples
This example shows how you can call the simplest request on the graph
     FB.graph.addEventListener(FBEvent.GRAPH_RESPONSE, onGraphResponse);
     FB.graph.addEventListener(FBEvent.GRAPH_RESPONSE_ERROR, onGraphError);
     FB.graph.call("https://graph.facebook.com/v2.8/me", URLRequestMethod.GET, new URLVariables("fields=name,email,picture&metadata=0"));
     
     function onGraphResponse(event:FBEvent):void
     {
         FB.graph.removeEventListener(FBEvent.GRAPH_RESPONSE, onGraphResponse);
         FB.graph.removeEventListener(FBEvent.GRAPH_RESPONSE_ERROR, onGraphError);
         
         trace(event.graphRequest);
         trace(event.param);
         trace("----------------");
     }
     
     function onGraphError(event:FBEvent):void
     {
         FB.graph.removeEventListener(FBEvent.GRAPH_RESPONSE, onGraphResponse);
         FB.graph.removeEventListener(FBEvent.GRAPH_RESPONSE_ERROR, onGraphError);
              trace("ERROR!");
         trace(event.graphRequest);
         trace(event.param);
         trace("----------------");
     }