AutoTweet is a Twitter bot that helps with tweeting at a scheduled time.
Note: The following processes below assumes you have set up all the tools above
cdto the directory where you want to install the script.
git clone https://github.com/Adetona/AutoTweet.gitto download the script to your machine Or simply run
npm install autotweetto install via npm
config.jsfile. You will find the following in the file:
Change the hash values to those provided to you by the Twitter app.
var tweetto the tweet you want to schedule.
var tweet = ['12:22 AM'];
cycleto the time you want to post the tweet. The current time in the script is 12:22 AM.
Learn more about setting the right time here
cdto the directory where the script is located, then type
node server.jsin your terminal and run it
If your configuration is complete the tweet will be posted to your account at the scheduled time.
If you want the script to be running continuosly you have to move it to a server.
Provided you have an Heroku account and Heroku CLI installed on your machine you can easily deploy AutoTweet to heroku.
npm install autotweetto download the script.
Heroku createto create the name for the app on heroku
git add .and
git commit -m 'initial commit'to stage the file for deploying.
git push heroku master
Now that you've pushed the project to heroku there's one more thing to check.
Go to your heroku dashboard and click on your app name. You will see some set of tabs, click on
Overview then go to
configure dynos. You will have two options --
Web and Worker. The web part means that the app is a web service but our app is
a bot so turn off the web and turn
ON the worker instead. Your bot won't work without completing this process.
The final process must look like this:
Congratulations, you did it!
You can get in touch with me via my twitter handle @adetona77