Monday, April 18, 2011

[YouTube-API] Re: PHP - Video entry state information not included for disallowed uploads using Zend_Gdata_YouTube::getUserUploads

Hello,

Could you try passing in the username 'default' to getUserUploads()
to ensure that you're actually requesting the uploads feed of the
currently authenticated user (i.e. 'default')? In general, I do think
that you should get back that app:state information from the uploads
feed assuming you're authenticated as the feed's owner.

Cheers,
-Jeff Posnick, YouTube API Team
~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~


On Apr 13, 7:10 am, colin_t <tonyst...@hotmail.co.uk> wrote:
> Hi,
>
> A user is able to upload to an account from my site, but i would like
> to provide a more detailed error message for why an upload was not
> allowed - not failed, as the upload is getting on the server and i'm
> getting the 200 response code - but disallowed, such as copyright
> infringement, the file couldn't be converted, duplicate upload etc.
>
> I am using php and the zend_gdata library. I find that when i use
> Zend_Gdata_YouTube::getUserUploads, even as an authenticated user, it
> does not return the state information, which i obtain from the
> videoEntry using the following:
>
> if($videoEntry->getControl()){
>         $control = $videoEntry->getControl();
>         $state = $control->getState()->getName();
>
> }
>
> If the upload was disallowed for one of the reasons mentioned above,
> this control is populated, or is null if the upload is ok. But when i
> know a video has been disallowed (by checking my youtube account),
> getting all my videos from Zend_Gdata_YouTube::getUserUploads does not
> return the above state information, even for disallowed videos. Yet if
> i retrieve each video individualy using:
>
> $youtube->setMajorProtocolVersion(2);
> $videoEntry = $youtube->getVideoEntry($videoId, null, true);
>
> ...gets the status information fine. I don't really want to use the
> getVideoEntry method for every recent upload as it's very wasteful and
> i'd prefer all my information in one hit, but is there any other way
> of getting video status information otherwise?

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment