PHP code example of vlechemin / facebook-batch-api
1. Go to this page and download the library: Download vlechemin/facebook-batch-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vlechemin / facebook-batch-api example snippets
// use the api as usual, please note the &
$me = &$facebook->batchApi('/me');
$picture = &$facebook->batchApi('/me/picture', 'GET', [
'type' => 'large',
'return_ssl_resources' => 1,
]);
// execute the batch to fill $me and $picture with the real value
$facebook->processBatch();
// use the results
var_dump($me);
var_dump($picture);