Main class to send requests to the Facebook API.
data:Object
[read-only]
Any resulting data returned from Facebook.
Implementation
public function get data():Object
See also
rawResult:String
[read-only]
Returns the un-parsed result from Facebook.
Usually this will be a JSON formatted string.
Implementation
public function get rawResult():String
success:Boolean
[read-only]
Returns true if this request was successful,
or false if an error occurred.
If success == true, the data property will be the corresponding
decoded JSON data returned from facebook.
If success == false, the data property will either be the error
from Facebook, or the related ErrorEvent.
Implementation
public function get success():Boolean
public function FacebookRequest(url:String, requestMethod:String = "GET", callback:Function = null)
Instantiates a new FacebookRequest.
Parameters
| url:String — The URL to request data from.
Usually will be https://graph.facebook.com.
|
|
| requestMethod:String (default = "GET ") — The URLRequestMethod
to be used for this request.
- GET for retrieving data (Default)
- POST for publishing data
- DELETE for deleting objects (AIR only)
|
|
| callback:Function (default = null ) — Method to call when this request is complete.
The signaure of the handler must be callback(request:FacebookRequest);
Where request will be a reference to this request.
|
public function call(method:String, values:Function = null, callback:* = null):void
Makes a request to the Facebook Graph API.
Parameters
| method:String |
|
| values:Function (default = null )
|
|
| callback:* (default = null )
|
public function callURL(callback:Function, url:String = "", locale:String = null):void
Parameters
| callback:Function |
|
| url:String (default = " ")
|
|
| locale:String (default = null )
|
public function close():void
Cancels the current request.
protected function isValueFile(value:Object):Boolean
Parameters
Returns
protected function objectToURLVariables(values:Object):URLVariables
Parameters
Returns
public function toString():String
Returns
| String — Returns the current request URL
and any parameters being used.
|