Packagecom.distriqt.extension.facebook.graphapi.events
Classpublic class GraphRequestEvent
InheritanceGraphRequestEvent Inheritance flash.events.Event

This event class is used for responses from a GraphRequest or GraphRequestBatch.

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
GraphRequestEvent
  errorCode : int
If an error occurred this will be an associated error code
GraphRequestEvent
  errorMessage : String
If an error occurred this will be an associated error message
GraphRequestEvent
Public Methods
 MethodDefined By
  
GraphRequestEvent(type:String, data:Object, errorCode:int = -1, errorMessage:String, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
GraphRequestEvent
  
clone():Event
[override]
GraphRequestEvent
Public Constants
 ConstantDefined By
  BATCH_COMPLETE : String = facebook_graphrequest_batch_complete
[static] Dispatched when a graph API request batch is completed.
GraphRequestEvent
  COMPLETE : String = facebook_graphrequest_complete
[static] Dispatched when a graph API request completed.
GraphRequestEvent
  ERROR : String = facebook_graphrequest_error
[static] Dispatched when there was an error returned from a Graph API request
GraphRequestEvent
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
GraphRequestEvent()Constructor
public function GraphRequestEvent(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)
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
BATCH_COMPLETEConstant
public static const BATCH_COMPLETE:String = facebook_graphrequest_batch_complete

Dispatched when a graph API request batch is completed.

COMPLETEConstant 
public static const COMPLETE:String = facebook_graphrequest_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 = facebook_graphrequest_error

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