Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-30-2008, 09:28 AM
Junior Member
 
Join Date: Mar 2008
Posts: 2
Question Changing Gdata YouTube demo to display Video Responses: doesn't work?

I'm trying to set up some YouTube integration stuff on one of my sites and I thought I'd familiarize myself with the gdata stuff by playing with the YouTube demo samples that come with the gdata libraries.

One of the functions in the demo gets a feed of all the related videos for a given video ID.

This function does not work anymore when I simply modify it to get Video Responses instead of Related Videos by changing this:

$ytQuery->setFeedType('related', $videoId);

to this:

$ytQuery->setFeedType('responses', $videoId);

(and looking at the libraries' source, 'responses' does indeed seem to be a valid parameter here so that shouldn't be a problem for as far as I can tell)

The original function returns a valid feed, the modified one throws this error message:
Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400' in /home/.marthena/reese_015/ipower.movielol.org/zendtest/Zend/Gdata/App.php:286 Stack trace: #0 /home/.marthena/reese_015/ipower.movielol.org/zendtest/Zend/Gdata/App.php(132): Zend_Gdata_App::import('http://gdata.yo...', Object(Zend_Http_Client), 'Zend_Gdata_YouT...') #1 /home/.marthena/reese_015/ipower.movielol.org/zendtest/Zend/Gdata.php(110): Zend_Gdata_App->getFeed('http://gdata.yo...', 'Zend_Gdata_YouT...') #2 /home/.marthena/reese_015/ipower.movielol.org/zendtest/Zend/Gdata/YouTube.php(136): Zend_Gdata->getFeed('http://gdata.yo...', 'Zend_Gdata_YouT...') #3 /home/.marthena/reese_015/ipower.movielol.org/zendtest/testresponses.php(73): Zend_Gdata_YouTube->getVideoFeed(Object(Zend_Gdata_YouTube_VideoQuery )) #4 /home/.marthena/reese_015/ipower.movielol.org/zendtest/testresponses.php(224): getVideoResponses() #5 {main} thrown in /home/.marthena/reese_015/ipower.movielol.org/zendtest/Zend/Gdata/App.php on line 286


Any ideas anyone?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-30-2008, 10:18 AM
Junior Member
 
Join Date: Mar 2008
Posts: 2
Default

Ok, found a way to make it work. I'm just using the 'getVideoResponseFeed' directly and that works. Don't know why the other way doesn't though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:35 PM.