Packagecom.facebook.graph.data
Classpublic class Batch
InheritanceBatch Inheritance Object

Helper class used to format batch API requests.

See also

To use this request pass it to Facebook.batchRequest(), or to FacebookDesktop.batchRequest(), Internally the request will be formatted to a proper Facebook batch request. On success (or error), the resulting data will be serialized into native flash objects.


Public Properties
 PropertyDefined By
  requests : Array
[read-only] Returns the current list of BatchItems to be sent to facebook.
Batch
Public Methods
 MethodDefined By
  
Batch
  
add(relativeURL:String, callback:Function = null, params:* = null, requestMethod:String = GET):void
Adds a new request to this Batch operation.
Batch
Property Detail
requestsproperty
requests:Array  [read-only]

Returns the current list of BatchItems to be sent to facebook.


Implementation
    public function get requests():Array
Constructor Detail
Batch()Constructor
public function Batch()



Method Detail
add()method
public function add(relativeURL:String, callback:Function = null, params:* = null, requestMethod:String = GET):void

Adds a new request to this Batch operation. Facebook limits you to a maximum of 20 requests per batch operation. For details look at:

Parameters

relativeURL:String — The method to be called on the graph api.
 
callback:Function (default = null) — The function to call after the API has parsed the result from facebook. ote: there will also be another callback issued when the entire operation is done.
 
params:* (default = null) — Object of values to pass with this api call.
 
requestMethod:String (default = GET) — URLRequestMethod used when facebook executes this command.

See also

https://developers.facebook.com/docs/reference/api/batch/