Skip to content

codezilla2018/cinema-Guru

Repository files navigation

cinema-Guru

[email protected] Lahiru Rathnayaka lahirutech IA4

This is the initial attemp on bulding a twitteer chat bot that automatically tweet when a subscribed youtube channel post new videos

Getting Started

This bot has two functioning parts

  1. Feeding the twitter bot with new youtube URLs=>
  2. Automatic tweeting with the new video links=>

Prerequisites

Things you need to install the software

You need to have a Twitter profile to run the app

Install Node.js and npm You can Download and install it from here note that when you download node.js it automatically downloads and install npm

Installing

Note that to receive the notofications from the youtube the application should be hosted on a live server.But we can test our twitter bot on a local machine.

  1. clone this repo on to your local machine git clone https://github.com/codezilla2018/cinema-Guru.git

  2. Navigate to the project folder and install these dependecis Install Express You can install express using this command npm install express

    Install Twit You can install Twit using this command npm install twit You can find the documentation about this package from here

    Install pubsubhubbub npm install pubsubhubbub You can find the documentation about this package from here

  3. After that You have to add the configuration keys to the downloaded app

    1. Visit to apps.twitter.con and sign in
    2. select Create a application and fill the credentials (for that you need to have phone number verified twitter account) You add your twitter profile URL if you dont have a website
    3. Select create your twitter application
    4. And select the tab "keys and access tokens" on the top and get your credentials
    5. click create my access token button at the bottom to generate access_token and access_token_secret
    6. fill the config.js file in the app with the keys you received
  4. run ```node postwitter.js`` on the command line

Deployment

You can deploy this bot in horeku for free. documentation to deploy a app in horeku can be found in here

Subscribe to Push Notifications (Youtube Data API)

To receive the push notifications from the Youtube you have to follow the steps in the official Youtube API documentation here

#what is the call back url It is the url of your deployed heroku app You can get the url by typing heroku open on Heroku Cli and automatically tou will load your call back url on browser

##testing wether deployed horeku app receive call backs from the youtube API After fillineg and submiting the callBack url and Topic url in here a

Your deployed app will receive a GET request which can be viewed from the heroku console like this screenshot_1

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

[email protected] Lahiru Rathnayaka lahirutech IA4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published