【问题标题】:YouTube Gdata API retrieving favorites using $yt->newVideoQueryYouTube Gdata API 使用 $yt->newVideoQuery 检索收藏夹
【发布时间】:2009-12-11 00:31:39
【问题描述】:

也许这是一个不常见的问题,但我们开始吧。这是代码

$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));

但是这样做我无法控制分页。

有什么想法吗?

【问题讨论】:

    标签: php youtube gdata-api


    【解决方案1】:

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

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

    【讨论】:

    • 是的,这是采用的解决方案。我已经使用 php+js 来解决这个问题。谢谢。
    猜你喜欢
    • 2012-05-27
    • 2013-08-10
    • 1970-01-01
    • 2011-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多