As the documentation describes, to delete a video it is necessary to get the video uploading channel for authenticated user and than invoke the delete method on the Zend_Gdata_YouTube service object, passing in the VideoEntry object that is being deleted.
The documentation and different web-dev blogs describes the process of the deleting video from Youtube using following code:
$videoEntryToDelete = $yt->getVideoEntry($videoId); $yt->delete($videoEntryToDelete);Looks simple, but the code example doesn't work. Method getVideoEntry doesn't provide the access to full control of the video.
To delete the video I used the method getFullVideoEntry() to get the videoEntry. The code example show how it can be done:
$videoEntry = $yt->getFullVideoEntry($videoId); $yt->delete($videoEntry)
awesome. it worked. saved me some time :)
ReplyDeletethnkx
You'r welcome :) Thanks for you comment.
DeleteThanks alot...
ReplyDelete