File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,23 @@ $batchResponse = $fb->sendBatchRequest($requests);
349
349
350
350
[ See a full batch example] ( ../examples/batch_request.md ) .
351
351
352
+ ## newBatchRequest()
353
+ ``` php
354
+ public Facebook\FacebookBatchRequest newBatchRequest(
355
+ string|AccessToken|null $accessToken,
356
+ string|null $graphVersion
357
+ )
358
+ ```
359
+
360
+ Instantiates an empty ` Facebook\FacebookBatchRequest ` .
361
+ To populate it use the [ ` Facebook\FacebookBatchRequest::add() ` ] ( FacebookBatchRequest.md#add ) method.
362
+
363
+ The ` $accessToken ` and ` $graphVersion ` arguments are the same as ` get() ` above.
364
+ If any of the requests contained in the batch request does not have either the ` $accessToken ` or the ` $graphVersion ` set,
365
+ it fallbacks to the values provided in the instantiation of the batch request.
366
+
367
+ [ See a full batch example] ( ../examples/batch_request.md ) .
368
+
352
369
## getRedirectLoginHelper()
353
370
``` php
354
371
public Facebook\Helpers\FacebookRedirectLoginHelper getRedirectLoginHelper()
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ Represents a batch request that will be sent to the Graph API.
4
4
5
5
## Facebook\FacebookBatchRequest
6
6
7
- You can instantiate a new ` FacebookBatchRequest ` entity directly by sending the arguments to the constructor.
7
+ You can instantiate a new ` FacebookBatchRequest ` entity directly by sending the arguments to the constructor or
8
+ by using the [ ` Facebook\Facebook::newBatchRequest() ` ] ( Facebook.md#newBatchRequest ) factory method.
8
9
9
10
``` php
10
11
use Facebook\FacebookBatchRequest;
You can’t perform that action at this time.
0 commit comments