how can i use php to get youtube user subscription channel videos and display all the channel feeds, i want create a class or function where if i pass a user name the php class would retrieve the latest uploads / activities in the user subscribed channels and display the url plus the title and the image, also i want to be able to pass the title and url to other functions so that i can save it to database. on a another page i found this Pulling in YouTube Videos from Specific Channel but its for only one specific channel.
1 Answers
0
votes
The relevant requests are for the newsubscriptionvideos feed in the YouTube GData API v2 or activities.list() in the newer YouTube Data API v3.
newsubscriptionvideos
might not be natively support in the Zend GData client library (I don't see it mentioned in the developer's guide), so if you go that route, you should probably use alt=jsonc
to get back an easy-to-parse JSON feed of the data. E.g, https://gdata.youtube.com/feeds/api/users/jeffposnicktest/newsubscriptionvideos?v=2&alt=jsonc
The alternative is to use v3's PHP client library to call activities.list()
.