This repository was archived by the owner on Jan 13, 2022. It is now read-only.
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);
349349
350350[ See a full batch example] ( ../examples/batch_request.md ) .
351351
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+
352369## getRedirectLoginHelper()
353370``` php
354371public 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.
44
55## Facebook\FacebookBatchRequest
66
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.
89
910``` php
1011use Facebook\FacebookBatchRequest;
You can’t perform that action at this time.
0 commit comments