Query in PHP using API v2.4
When I try to upload a video using AdVideo class as shown below,
$time_limit = ini_get('max_execution_time');
set_time_limit(0);
$video = new AdVideo(null, $account_id);
$video->{AdVideoFields::NAME} = *name*;
$video->{AdVideoFields::SOURCE} = *video_path*;
try {
$video->create();
} catch (\FacebookAds\Http\Exception\RequestException $e) {
echo "<script>alert('" . $e->getErrorUserMessage() . "')</script>";
set_time_limit($time_limit);
return;
}
set_time_limit($time_limit);
Result:
I get the following exception -
'Operation timed out after 60000 milliseconds with 0 bytes received'
The video I upload is around 20MB and it would take more time to upload. How to handle this? Is there a way we can show the progress of upload? Does this class support chunked upload ?
Tried set_time_limit(0); but no help.