Packagecom.distriqt.extension.facebookapi.events
Classpublic class GraphAPIRequestEvent
InheritanceGraphAPIRequestEvent Inheritance flash.events.Event

This event class is used for responses from a GraphAPIRequest or GraphAPIRequestBatch.

The event will generally include a data or error property, which you can inspect for information about the event.

Due to the different response data returned from Facebook, these properties may not always be parsed and returned properly objects or strings. In these cases, you can usually inspect the rawData string for additional information about the response.



Public Properties
 PropertyDefined By
  data : Object
The data returned from Facebook for the request
GraphAPIRequestEvent
  errorCode : int
If an error occurred this will be an associated error code
GraphAPIRequestEvent
  errorMessage : String
If an error occurred this will be an associated error message
GraphAPIRequestEvent
Public Methods
 MethodDefined By
  
GraphAPIRequestEvent(type:String, data:Object, errorCode:int = -1, errorMessage:String, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
GraphAPIRequestEvent
Public Constants
 ConstantDefined By
  BATCH_COMPLETE : String = facebookapi:graphapirequestbatch:complete
[static] Dispatched when a graph API request batch is completed.
GraphAPIRequestEvent
  COMPLETE : String = facebookapi:graphapirequest:complete
[static] Dispatched when a graph API request completed.
GraphAPIRequestEvent
  ERROR : String = facebookapi:graphapirequest:error
[static] Dispatched when there was an error returned from a Graph API request
GraphAPIRequestEvent
Property Detail
dataproperty
public var data:Object

The data returned from Facebook for the request

errorCodeproperty 
public var errorCode:int

If an error occurred this will be an associated error code

errorMessageproperty 
public var errorMessage:String

If an error occurred this will be an associated error message

Constructor Detail
GraphAPIRequestEvent()Constructor
public function GraphAPIRequestEvent(type:String, data:Object, errorCode:int = -1, errorMessage:String, bubbles:Boolean = false, cancelable:Boolean = false)

Constructor

Parameters
type:String
 
data:Object
 
errorCode:int (default = -1)
 
errorMessage:String
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
Constant Detail
BATCH_COMPLETEConstant
public static const BATCH_COMPLETE:String = facebookapi:graphapirequestbatch:complete

Dispatched when a graph API request batch is completed.

COMPLETEConstant 
public static const COMPLETE:String = facebookapi:graphapirequest:complete

Dispatched when a graph API request completed.

The event data field will be an object that was parsed from the JSON response of the graph API request.

You should check the documentation of the Facebook Graph API to see what data you can expect to be returned here.

ERRORConstant 
public static const ERROR:String = facebookapi:graphapirequest:error

Dispatched when there was an error returned from a Graph API request