YouTube Gdata API使用$ yt-> newVideoQuery检索收藏夹

时间:2009-12-11 00:31:40

标签: php youtube gdata-api

也许这是一个不太常见的问题,但我们走了。这是代码

$userName=("Google");
$yt = new Zend_Gdata_YouTube();

$query = $yt->newVideoQuery();
$query->setAuthor($userName);
$query->setMaxResults(3);
$query->setStartIndex(2);
printVideoFeed($yt->getVideoFeed($query));

它工作正常。但我的客户也希望包括他的收藏列表。

应该可以使用

printVideoFeed($yt->getUserFavorites($userName));

但通过这样做,我无法控制分页。

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

你不能用$yt->getUserFavorites($userName);来检索用户的收藏夹吗?

或者,您可以使用JavaScript控制分页,计算dom元素的数量,然后执行逻辑