I'm trying to set status.publishAt but return 400 with message The request metadata is invalid
Here my code:
$videos = $youtube->videos->listVideos('id,snippet,status', array(
'id' => $videoId,
));
$updateVideo = $videos[0];
$date = "2016-10-20T20:00:00.00+00:00";
$updateVideo['status']['embeddable'] = true;
$updateVideo['status']['privacyStatus'] = 'private';
$updateVideo['status']['publicStatsViewable'] =true;
$updateVideo['status']['publishAt'] = $date;
$videoUpdateResponse = $youtube->videos->update('id,snippet,status', $updateVideo);
dd($videoUpdateResponse);
exit();
Where's wrong? Please help me! Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire