Answer the question
In order to leave comments, you need to log in
How to get the last video of a channel with the number of views in YouTube api?
How to get the last video of a channel with the number of views in YouTube api?
Can this be done in one request?
now done through https://www.googleapis.com/youtube/v3/search...
but there is no number of views
Answer the question
In order to leave comments, you need to log in
I myself recently did a project related to YouTube. They actually
have some kind of confusing scheme.
Here is the answer to your question from my code:
if ($params[1] == 'channel') {
$method = 'channel_id';
} elseif ($params[1] == 'user') {
$method = 'user';
} else {
$method = 'user';
}
$url = "https://www.youtube.com/feeds/videos.xml?{$method}={$name}";
<media:community>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question