Package | com.distriqt.extension.facebook.graphapi.events |
Class | public class GraphRequestEvent |
Inheritance | GraphRequestEvent 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.
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
GraphRequestEvent(type:String, data:Object, errorCode:int = -1, errorMessage:String, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
| GraphRequestEvent | ||
clone():Event [override] | GraphRequestEvent |
Constant | Defined 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 |
data | property |
public var data:Object
The data returned from Facebook for the request
errorCode | property |
public var errorCode:int
If an error occurred this will be an associated error code
errorMessage | property |
public var errorMessage:String
If an error occurred this will be an associated error message
GraphRequestEvent | () | Constructor |
public function GraphRequestEvent(type:String, data:Object, errorCode:int = -1, errorMessage:String, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
Parameterstype:String | |
data:Object | |
errorCode:int (default = -1 )
| |
errorMessage:String | |
bubbles:Boolean (default = false )
| |
cancelable:Boolean (default = false )
|
clone | () | method |
override public function clone():Event
ReturnsEvent |
BATCH_COMPLETE | Constant |
public static const BATCH_COMPLETE:String = facebook_graphrequest_batch_complete
Dispatched when a graph API request batch is completed.
COMPLETE | Constant |
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.
ERROR | Constant |
public static const ERROR:String = facebook_graphrequest_error
Dispatched when there was an error returned from a Graph API request