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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -