删除使用Zend / PHP YouTube视频 [英] Deleting YouTube videos using Zend/PHP

查看:154
本文介绍了删除使用Zend / PHP YouTube视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Zend和PHP上传和从我家页面上删除视频。上传部分工作正常,但下载是比较复杂的。

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.

$videoEntryToDelete = $yt->getVideoEntry($videoId);
$yt->delete($videoEntryToDelete);

我用这个code删除视频和第一行做的工作。视频对象被创建,我可以从它那里得到的所有数据。但是,当我尝试删除它,我得到这个错误信息:
你必须指定一个URI到发布

I use this code to delete a video and the first row do work. The video object is created and I can get all data from it. But when I try to delete it I get this error message: "You must specify an URI to which to post"

难道有谁知道如何解决这个问题?

Do anyone know how to solve this problem?

谢谢!

推荐答案

默认情况下,getVideoEntry()得到一个只读视频对象。为了编辑它,你必须在第三个参数传递如此getVideoEntry()。然后,视频对象将包含元数据的所有,包括删除它所需的URL。

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.

试试这个:

$videoEntryToDelete = $yt->getVideoEntry($videoId, null, true);
$yt->delete($videoEntryToDelete);

这篇关于删除使用Zend / PHP YouTube视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆