How do you cancel a scheduled YouTube Video (API v3) from publishing? -
i integrating new youtube api cms. when schedule article youtube video attached, send request youtube schedule video published @ same time.
my problem after scheduling article, want able set associated youtube video "private" status , undo scheduling. here code attempting this:
$listresponse = $youtube->videos->listvideos("status", array('id' => $videoid)); if (empty($listresponse)) { die("can't find video given id"); } else { $video = $listresponse[0]; $videostatus = $video['status']; $videostatus['privacystatus'] = "private"; $updateresponse = $youtube->videos->update("status", $video); $responsetags = $updateresponse['status']['tags']; }
how can cancel scheduling?
found answer writing question out. achieve trying here, had replace line:
$videostatus['privacystatus'] = "private";
with line:
$videostatus['publishat'] = null;
i hope of @ point!
Comments
Post a Comment