Get information about comments on youtube videos realtime - youtube

I'm trying to integrate youtube into my system, and I'm having a hard time getting information about comments when someone comments on youtube.
For facebook, it has a webhook mechanism that helps me receive notifications about the news I subscribe to on the webhook.
In the case of youtube, is there a mechanism or something like that?
I've read through the docs on https://developers.google.com/youtube and haven't found anything that could meet my needs.
Do you have a link to any documentation or tutorials on this part?
I thank you very much for your help.

Related

Can I get a YouTube user's session data from the YouTube API?

I am a teacher and I have a YouTube channel with videos for my students. Every time one of my students see a video, I would love to know how he interacted with it: where he has paused it , where he has rewinded it, etc. This would help me in knowing the parts of the video that are difficult to understand.
My question is: is it possible to get all this data from a user's session? Specifically, can I get these detailed raw data from YouTube APIs?
From what I have explored so far, it seems that it is not possible, as YouTube APIs only seem to send "aggregated" data (example: total number of views of a video) or "properties" (example: title of the video).
I would really just need a Yes/No answer to my question, just to know if I am not waisting my time in exploring the APIs as a solution to my problem.
Thank you.
Yes and no,
But here is a more detailed explanation.
The YouTube Analytics api will give you analytics data on your own YouTube channel, but it wont be user specific you cant track who exactly did something. You may however be able to get some basic information about each video and what was clicked and how much was viewed. video reports But its not going to be user specific you wont know what Mike did as opposed to what Jane did.
The YouTube Data api will allow you to manage your own YouTube Channel for example upload videos and see subscriptions. It will also let you search for public videos on YouTube.
If you do want user specific then What you are looking for is session data related to user activity. Something like this is not publicly available. Google couldn't share your students activity without the students permission due to GDPR not to mention the fact that tracking anyone under the age of 13 would also be against some GDPR laws if i remember correctly.
Even Google analytics doesn't offer websites a decent way of tracking individual users activity on their websites. You can do it but you have to add additional tracking data to your website, and notify users that you are doing it.
SO your answer is yes kind of

How to know when a user complete viewing a video with youtube api?

I currently working on a project where I send a youtube video id and show it to the user. And I want to know if there are a method to know when the video is completely viewed by the user. In my application's client, I send a response to the server when the view is completed, and I want to prevent receiving falsed data from untrusted user. And that's why I want to know if youtube api make a things like that. I have seen other similar topics, but I haven't found a safe way to secure communication between client and server for this problem.
Thank you.
From this SO post, it was mentioned that you can use onStateChange event to log that a user viewed a video. But the general idea here is about safety which I think is more important, from there I don't think you can do this as per the privacy of a user. You can understand more about YouTube Reporting and Analytics here.

Rails & Youtube: Can I get notified when a new video is uploaded by a specific channel?

I am looking for some sort of webhook that notifies my app when a new video is uploaded by a channel, so that I can create a new Video object in my app.
The only resource I could find was youtube push notifications, but not sure if this is what I'm looking for or how to implement it in a rails app.
Could I get a brief overview on how to accomplish this?
It looks like you have found your answer. I'd recommend working through the Youtube Api and push notifications docs starting with the page you found, then looking at the PubSubHubbub github docs since that is the solution google has implemented for you. In the process you will probably become much more adept at working with the youtube data API.
Alternately you could use a scheduling gem to periodically check the list(s) yourself but I believe this might end up being more work for a worse solution.

YouTube API v3 method to get new subscription videos

There currently doesn't seem to be a way to get new subscription videos through the YouTube v3 API, i.e an equivalent to the "newsubscriptionvideos" method in v2 and the "My subscriptions" page on the website. "activities.list" with "home=true" is not sufficient because it randomly omits videos.
Most rececently, I came across this iOS app called Tubex that seemed to figure out a solution. Their feed is absolutely spot on so there is no way they are following what we are currently doing. Anyone have any idea what kind of workaround Tubex may be doing to get it so accurate?

How to get Youtube's Trending Music Feed using its API

Basically, what I want to get is Youtube's Trending Music in UK. I want to get the videos that are recently uploaded and is trending starting with few views.
Example:
http://www.youtube.com/channel/HCp-Rdqh3z4Uc/videos?query=NErAuLQauvw&view=22&feature=g-logo
I am confused which one of the feeds below is more applicable to me.
https://gdata.youtube.com/feeds/api/channelstandardfeeds/most_viewed?time=today&v=2
https://gdata.youtube.com/feeds/api/standardfeeds/UK/on_the_web_Music
Please help me with this. Your answer and ideas will be greatly appreciated. Thanks
Youtube channels usually start with the prefix UC. In this case the channel starts with HC what for as for I know means hidden channel. This means that you can only access them via the api if you have the right credentials.
This channels are maintained by youtube and they do not share that info for third party apps.
So if you want to rip it you will have to make a own webservice that searches the youtube site and stores the video id's or build an html parser or something like that in your application.

Resources