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
cd
to the directory where you want to install the script. git clone https://github.com/Adetona/AutoTweet.git
to download the script to your machine Or simply run npm install autotweet
to install via npm
config.js
file. You will find the following in the file:
consumer_key: '',
consumer_secret: '',
access_token: '',
access_token_secret: ''
Change the hash values to those provided to you by the Twitter app.
server.js
file. var tweet
to the tweet you want to schedule. var tweet = ['12:22 AM'];
cycle
to 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
cycle: '12:22:00'
cd
to the directory where the script is located, then type node server.js
in 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 autotweet
to download the script.
Heroku create
to 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