Just wondering how I would delete a video from YouTube using v3 of the API using the official Google PHP library.
I see this here:
Deleting a video from a playlist with YouTube Data API v3
$youtubeService = new Google_YouTubeService($client);
$playlistItems = $youtubeService->playlistItems;
$deleteVid = $playlistItems->delete($videocode);
Not sure if this is correct - does this work if the video is not in a playlist?
I also have the code for v2 of the API
Deleting YouTube videos using Zend/PHP
$videoEntryToDelete = $yt->getVideoEntry($videoId, null, true);
$yt->delete($videoEntryToDelete);
But rather use v3
Copyright Notice:Content Author:「KB.」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/26783848/how-to-delete-a-video-using-the-youtube-api-v3-and-php