Cloudkibo / KiboPush

0 stars 1 forks source link

webhook and integration of youtube #420

Closed sojharo closed 6 years ago

sojharo commented 7 years ago

We would write the youtube specific webhook and server side logic to subscribe, unsubscribe and listen for new content here.

sojharo commented 7 years ago

I had started work on this yesterday. It is under construction. I am having some setup issues with pubsubhubbub server of google. I am working to resolve it.

sojharo commented 7 years ago

I tried resolving problem by creating a new youtube channel and connecting it with kibopush. Still it didn't work. I was able to successfully setup the server of pubsubhubbub on Friday.

sojharo commented 7 years ago

I worked on this yesterday and written the logic to do subscription to channel. i also added the logic to avoid subscribe same channel multiple times. The remaining work is on unsubscribe and webhook notifications.

jekram commented 7 years ago

Ok. Thanks for the update

jekram commented 7 years ago

Since you have already started let's complete it.

sojharo commented 7 years ago

Spent a lot of time on this. It seems that there is some error on node-pubsubhubbub library. It is also not updated since 4 years.

https://github.com/pubsubhubbub/node-pubsubhubbub

When I try to check my subscription on Google hub. I get the following error.

screen shot 2017-09-15 at 12 09 54 pm

I need to put it on hold till the convos are done. After convos, I would start with other content creators first i.e. twitter, facebook and blogspot. This one is wasting lot of time and blocking other tasks.

sojharo commented 6 years ago

I spent time on this yesterday and read the specifications of pubsubhubub and understood how it works. I also read the code of library that we were using and tried to understand where the error is. I would today write the nodejs code which would use pubsubhubbub specification to listen to youtube.

jekram commented 6 years ago

@sojharo what is the update here?

sojharo commented 6 years ago

I have completed the code on this but I am still not able to get notification when new video is getting published. I looked into youtube documentation as well and found that they have two ways of channels. One is legacy channel and other is new channel which is connected to Google Plus profile. I am trying both but still not able to receive the update. As a next step, I would create a new google account and test with that one. My current account is very old and it is showing both legacy and current channel ids. I think I am doing problems with channel ids and legacy accounts.

jekram commented 6 years ago

We should focus on new channel only. Once that is working then we can decide if we want to do legacy channel or not. We may do that in v2. I would very much like to close this track asap,

sojharo commented 6 years ago

I have completed the work on this. I need help in testing it with a new channel. Assigning @AnishaChhatwani to test it.

jekram commented 6 years ago

Great

AnishaChhatwani commented 6 years ago

I provided the url to my youtube channel but the channel is not being added

screen shot 2017-11-03 at 10 29 01 am screen shot 2017-11-03 at 10 28 51 am

sojharo commented 6 years ago

I had solved the channel adding problem. I had tested with new channel but it catches some youtube channels but not others. I am looking more into this today.

sojharo commented 6 years ago

I worked on this yesterday. Still the problem persists. After some research, I have found new article regarding pubsubhubbub implementation. I would implement that today.

sojharo commented 6 years ago

I have completed the code of new article in this. I am getting video notifications. I am now doing more tests on this with different channels. At noon, I would assign it to Anisha for testing.

sojharo commented 6 years ago

This further improved. I am assigning it for testing.

jekram commented 6 years ago

@AnishaChhatwani Please test

jekram commented 6 years ago

@AnishaChhatwani what is the update on this testing

AnishaChhatwani commented 6 years ago

I tested it. I added my youtube channel on kiboPush app and then uploaded a video on my channel. But I didn't get the video on my messenger.

sojharo commented 6 years ago

I have tried solving it. It is under construction. For some channels, it is still not sending the video. I am trying to solve it. It takes time in testing on my side because it takes time to upload the video and then it takes more time to call the webhook.

sojharo commented 6 years ago

I tried with the other library as well. But didn't get much success. We can close this task and I would ask Imran to remove from the client the option of Youtube.

jekram commented 6 years ago

Provide a link to Youtube integration

sojharo commented 6 years ago

Here it is:

https://developers.google.com/youtube/v3/guides/push_notifications