We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we pull other data besides the youtube subscriber counter?
For example:
Subscribers: Total Video: Total Views: Total Likes: Total Dislikes: Total Comment:
Thanks for this.
I did some research, tried something based on some examples but some of them are not working.
Source: https://stackoverflow.com/questions/25826571/get-comment-or-likes-count-for-youtube-video-using-api-3-0
<?php // PHP - SUBSCRIBER COUNT USING YOUTUBE API V3 // BY @danielsebesta // Google Developers: https://console.developers.google.com/apis/?pli=1 // Youtube Channel ID: https://www.youtube.com/account_advanced $api_key = "AIzaSyBc-UkCwebflDh1pi0rNL7QTP-1Skf8TnU"; $channel_id = "UCfUwyi5dAZ3DuXI8GP9vhUg"; $api_response = file_get_contents('https://www.googleapis.com/youtube/v3/channels?part=statistics&id=' . $channel_id . '&key=' . $api_key . ''); $api_response_decoded = json_decode($api_response, true); // Subscribers $subscribers = $api_response_decoded['items'][0]['statistics']['subscriberCount']; // Videos $videos = $api_response_decoded['items'][0]['statistics']['videoCount']; // Views $views = $api_response_decoded['items'][0]['statistics']['viewCount']; // Likes $likes = $api_response_decoded['items'][0]['statistics']['likeCount']; // Dislikes $dislikes = $api_response_decoded['items'][0]['statistics']['dislikeCount']; // Dislikes $comments = $api_response_decoded['items'][0]['statistics']['commentCount']; echo $subscribers; echo "</br></br>"; echo $views; echo "</br></br>"; echo $likes; echo "</br></br>"; echo $dislikes; echo "</br></br>"; echo $comments; echo "</br></br>"; echo $videos; ?>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Can we pull other data besides the youtube subscriber counter?
For example:
Subscribers:
Total Video:
Total Views:
Total Likes:
Total Dislikes:
Total Comment:
Thanks for this.
I did some research, tried something based on some examples but some of them are not working.
Source: https://stackoverflow.com/questions/25826571/get-comment-or-likes-count-for-youtube-video-using-api-3-0
The text was updated successfully, but these errors were encountered: