[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
This bot has two functioning parts
- Feeding the twitter bot with new youtube URLs=>
- Automatic tweeting with the new video links=>
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
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.
-
clone this repo on to your local machine
git clone https://github.com/codezilla2018/cinema-Guru.git
-
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 hereInstall pubsubhubbub
npm install pubsubhubbub
You can find the documentation about this package from here -
After that You have to add the configuration keys to the downloaded app
- Visit to apps.twitter.con and sign in
- 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
- Select create your twitter application
- And select the tab "keys and access tokens" on the top and get your credentials
- click create my access token button at the bottom to generate access_token and access_token_secret
- fill the config.js file in the app with the keys you received
-
run ```node postwitter.js`` on the command line
You can deploy this bot in horeku for free. documentation to deploy a app in horeku can be found in here
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
This project is licensed under the MIT License - see the LICENSE.md file for details