2

如何使用 YouTube API根据特定频道(如nba、国家地理)获取用户特定的推荐视频?

我正在使用以下 API 来获取推荐的视频。

https://gdata.youtube.com/feeds/api/users/default/recommendations?v=2&key=&access_token=

key-> 我正在传递我的开发者密钥

access_token-> 我正在传递身份验证令牌。

它返回我推荐的特定用户的视频。但我需要特定频道的推荐视频,例如 nba、国家地理。

任何人都可以请帮忙。

4

1 回答 1

1

I know this is old but in case anyone googling this comes across this answer, a workaround until there is a full recommendation API in YouTube API v3 is to use the Activity List feature, then just go through the results looking for "type": "recommendation":

https://developers.google.com/youtube/v3/docs/activities/list

GET https://www.googleapis.com/youtube/v3/activities?part=snippet&home=true&maxResults=50&key={YOUR_API_KEY}

(don't forget to use an auth token for a user for this to work)

于 2013-12-27T21:29:49.940 回答