Deleting YouTube videos using Zend/PHP

后端 未结 2 1121
野的像风
野的像风 2021-01-06 09:16

I\'m using Zend and PHP to upload and delete videos from my home page. The uploading part is working fine but to download is more complicated.

$videoEntryToD         


        
相关标签:
2条回答
  • 2021-01-06 09:37

    there is also a method ready to use:

    $videoEntryToDelete = $yt->getFullVideoEntry($videoId);
    $yt->delete($videoEntryToDelete);
    
    0 讨论(0)
  • 2021-01-06 09:38

    By default, getVideoEntry() gets a read only video object. In order to edit it, you must pass true in the third parameter for getVideoEntry(). The video object will then contain all of the metadata, including the URL required to delete it.

    Try this:

    $videoEntryToDelete = $yt->getVideoEntry($videoId, null, true);
    $yt->delete($videoEntryToDelete);
    
    0 讨论(0)
提交回复
热议问题