$ch = curl_init('https://graph.facebook.com/graphql');
curl_setopt_array($ch, [
CURLOPT_POST => 1,
CURLOPT_HTTPHEADER => ['Expect:'],
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_RETURNTRANSFER => 1,
//CURLOPT_HEADER => 1,
//CURLOPT_VERBOSE => 1,
/*CURLOPT_HTTPHEADER => [
'Authorization: OAuth ' . $access_token
]*/
]);
foreach ($page_ids as $page_id) {
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'query_params' => json_encode([
'0' => $page_id,
//'2' => 'PLACES',
//'3' => 80,
//'4' => 'all',
'5' => ['chrono'],
//'6' => '100009689893320:230142727001876',
'7' => $slice,
]),
'query_id' => $query_id,
'access_token' => $access_token,
/*'method' => 'get',
'strip_nulls' => 'true',
'strip_defaults' => 'true',
'locale' => 'en_US',
'client_country_code' => 'AE',
'fb_api_req_friendly_name' => 'FetchMoreReviewsOrderBy',
'fb_api_caller_class' => 'com.facebook.reviews.protocol.graphql.PageReviewsFragmentsModels$ReviewsOrderByModel',*/
]);