相关疑难解决方法(0)

如何使用Youtube API获取Youtube频道横幅?

我正在开发一个PHP项目,需要从特定的用户名获取Youtube频道横幅(或封面照片),头像和上传的视频.

对于头像和视频,我用: https://gdata.youtube.com/feeds/api/channels?q=Username&alt=json&v=2

但对于频道横幅,我在互联网上搜索但没有运气.这里有人可以帮帮我吗?非常感谢!

php youtube youtube-api

13
推荐指数
1
解决办法
7118
查看次数

YouTube API - 没有为用户名的查询返回频道品牌设置

使用YouTube API v3查询频道的品牌设置时,为什么他们会按渠道ID返回查询,但不会按用户名查询?API不会按用户名返回频道列表查询的品牌设置.

如果您按频道ID(例如id=UC8-Th83bH_thdKZDJCrn88g)查询频道的品牌设置,则会返回一组完整的品牌设置:

Google API Explorer:https://developers.google.com/youtube/v3/docs/channels/list

请求

GET https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&id=UC8-Th83bH_thdKZDJCrn88g&key={YOUR_API_KEY}
Run Code Online (Sandbox Code Playgroud)

响应

{
    // ... snip ...
    "items": [
    {
        "kind": "youtube#channel",
        "etag": "\"...\"",
        "id": "UC8-Th83bH_thdKZDJCrn88g",
        "brandingSettings": {
            "channel": {
                "title": "The Tonight Show Starring Jimmy Fallon",
                "description": "Watch The Tonight Show Starring Jimmy Fallon Weeknights 11:35/10:35c\n\nThe Tonight Show Starring Jimmy Fallon features hilarious highlights from the show including: comedy sketches, music parodies, celebrity interviews, ridiculous games, and, of course, Jimmy's Thank You Notes and hashtags! …
Run Code Online (Sandbox Code Playgroud)

youtube youtube-api

1
推荐指数
1
解决办法
1914
查看次数

标签 统计

youtube ×2

youtube-api ×2

php ×1