Batch objects facilitate grouping multiple API calls into a single batch request. Most library methods accept a
Batch object as an optional first parameter.
Batch objects are instantiated using Graph.createBatch.
var batch = graph.createBatch();
An array of the batched requests. It is used internally by library methods, and it should be not be necessary to edit manually. NEVER reassign this property. For example:
batch.requests = ; will break the batch system.
Batch.run ( ) Batch.run ( Function errorHandler )
Runs all requests associated with the
Batch object in a single API request.
- If provided, this function will be called in case of an error. If no error handler is provided, callbacks associated with each individual request will all be called with the error.
Function ( error )