Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Youtube api 如何检索最近上传到friend';s频道?_Youtube Api - Fatal编程技术网

Youtube api 如何检索最近上传到friend';s频道?

Youtube api 如何检索最近上传到friend';s频道?,youtube-api,Youtube Api,理论上,这就是我需要的api: https://developers.google.com/youtube/2.0/developers_guide_protocol_subscriptions#Retrieving_new_subscription_videos 事实上,如果我点击,我会看到最近朋友上传的视频(订阅) 但是调用该端点(alt=json)会得到以下结果: { "version": "1.0", "encoding": "UTF-8", "feed": {

理论上,这就是我需要的api:

https://developers.google.com/youtube/2.0/developers_guide_protocol_subscriptions#Retrieving_new_subscription_videos
事实上,如果我点击,我会看到最近朋友上传的视频(订阅)

但是调用该端点(alt=json)会得到以下结果:

{
    "version": "1.0",
    "encoding": "UTF-8",
    "feed": {
        "xmlns": "http://www.w3.org/2005/Atom",
        "xmlns$openSearch": "http://a9.com/-/spec/opensearch/1.1/",
        "xmlns$gd": "http://schemas.google.com/g/2005",
        "gd$etag": "W/\"CEIMSHwyfSp7I2A9Wh5QGU0.\"",
        "id": {
            "$t": "tag:youtube.com,2008:user:ysWGKld9kilWfiqcfr1pfQ:newsubscriptionvideos"
        },
        "updated": {
            "$t": "2013-11-08T01:23:09.295-08:00"
        },
        "category": [
            {
                "scheme": "http://schemas.google.com/g/2005#kind",
                "term": "http://gdata.youtube.com/schemas/2007#video"
            }
        ],
        "title": {
            "$t": "New Subscription Videos for Mauro Vicentini"
        },
        "logo": {
            "$t": "http://www.gstatic.com/youtube/img/logo.png"
        },
        "link": [
            {
                "rel": "alternate",
                "type": "text/html",
                "href": "https://www.youtube.com/subscription_center"
            },
            {
                "rel": "http://schemas.google.com/g/2005#feed",
                "type": "application/atom+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos"
            },
            {
                "rel": "http://schemas.google.com/g/2005#batch",
                "type": "application/atom+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos/batch"
            },
            {
                "rel": "self",
                "type": "application/atom+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos?alt=json&start-index=1&max-results=25"
            },
            {
                "rel": "service",
                "type": "application/atomsvc+xml",
                "href": "https://gdata.youtube.com/feeds/api/users/ysWGKld9kilWfiqcfr1pfQ/newsubscriptionvideos?alt=atom-service"
            }
        ],
        "author": [
            {
                "name": {
                    "$t": "YouTube"
                },
                "uri": {
                    "$t": "http://www.youtube.com/"
                }
            }
        ],
        "generator": {
            "$t": "YouTube data API",
            "version": "2.1",
            "uri": "http://gdata.youtube.com"
        },
        "openSearch$totalResults": {
            "$t": 0
        },
        "openSearch$startIndex": {
            "$t": 1
        },
        "openSearch$itemsPerPage": {
            "$t": 25
        }
    }
}
实际上那里没有任何“视频”提要


我哪里错了?

大概是这样吧

https://gdata.youtube.com/feeds/api/users/[userID]/subscriptions?v=2&alt=json 或 https://gdata.youtube.com/feeds/api/users/[userID]/newsubscriptionvideos?v=2&alt=json

别忘了添加你的youtube用户ID,你可以在

现在,如果您想显示其他人的订阅,但您不知道他们的用户ID,您可以使用誓言2.0进行身份验证

或者干脆跟我一起去


https://gdata.youtube.com/feeds/api/users/[youtube_username]/newsubscriptionvideos?v=2&alt=json

视频列表的预期输出提要是什么。我的意思是:我可以在/my_订阅中看到的视频在哪里?即使是因为此提要中存储的信息应该是什么在B<代码>http://gdata.youtube.com/feeds/base/users/default/newsubscriptionvideos?v=2&alt=json是否返回相同的jsonUhm?否,这将返回订阅。我需要返回订阅频道的视频源。也就是说,这是可行的。我不知道为什么它对我的帐户不起作用