Jump to content

Youtube API retreve users older videos


wee493

Recommended Posts

Currently I'm using the youtube api to display a users videos. By default it only displays 25 of the most recent videos. I'm wanting to diaply all of a users videos, so I'm thinking I will have to fun multiple requests. I think I need to use the "StatIndex" to start at 26, but I'm not sure.

 

I would post the code, but this is pretty much a you know it or you don't type of thing.

 

Any help would be nice.

Link to comment
https://forums.phpfreaks.com/topic/181351-youtube-api-retreve-users-older-videos/
Share on other sites

 

 

$q = 'community channel';
$q = str_replace(' ','%20',$q);
$src = @file_get_contents("http://gdata.youtube.com/feeds/videos?vq={$q}&start-index=1&max-results=5")

Thanks, but I was hoping to use something a little more like

  $query->setStartIndex('26');

as it states in the api, but this does not work.

 

  $videoFeed = $yt->getVideoFeed($location);
  $query = $yt->newVideoQuery();
  $query->setStartIndex('26');
  $videoFeed = $yt->getVideoFeed($query->getQueryUrl(2));

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.