A simple python based script for micro-managing a twitter account by replying to mentions, liking and retweeting timeline tweets, updating the user timeline, following to gain more traction and follow backs in a short period of time, super cool!scripts
Ok so let's begin this awesome journey by clicking the "get code" link above which will redirect you to the master tree for the python scripts, feel free to use any tool you want to clone or simply click on the download button or you can copy the git clone url and use the "git clone" command if you feeling fancy.
Now in order to run the script, you need to install "PYTHON-3.7" for your environment, a simple google search will help you get the file and install process. After you are done run these two commands respectively in your terminal or command prompt "python3 --version" and "pip3 --version", this will print the python version and the python package manager versions respectively. Cool!
Since you might be testing, simply goto "https://twitter.com/" and create a test account, after that also visit "https://developer.twitter.com/" and sign up for a developer account. Now you might be required to verify your email or phone number, just go through with it. Upon completing that, goto the dashboard and point your cursor the top right corner, hover over the links and find the "Apps" option, click on that and create an app, also go through the requirements like you did before. That's all, that was a long one! LOL... anyway please keep the browser tab open, we will be back for some keys.
This step is very simple, visit "https://newsapi.org" and register for an account, you will be logged right in and that is all for that, keep the browser tab open, we will come back for some keys.
The script you just cloned needs a couple of other packages to run smoothly, so simply change directory into the folder from your terminal and run this command "pip3 install -r requirements.txt". This will get and install everything for you. Finally something simple!
In this step, we will add in our twitter and news api keys, so head to the cloned folder and open the "keys.py" file up in your favourite editor. Now goto to your twitter developer dashboard and click on your app then select the "Access Tokens" tab, you wouldn't have the access keys generated for you so click on the generate button to get one. Now in the "keys.py" file you would see the labels for each key in there, simply copy and paste them respectively. Now for the NewsAPI key, head to the news api tab in your browser and copy your "api_key" in your account page and paste it at the "NEWS_API" label in the "keys.py" file. For the last two labels feel free to add in any hash tags you prefer and the script will use it to gain its traction. That's all for the "keys.py" file. Hurraay!!!
So excited!, now let's run what we've been waiting for, simply change directory into the cloned folder if you have not done that already and run this command "python3 main.py", this will boot up the bot and start printing what it is up to on the terminal to keep you informed, now goto you twitter account watch as the magic you just setup happens!.
This is very easy to do, simple change directory into the cloned folder above and run this command "python3 main.py" and that's it! it will boot up and start automating. Enjoy!
Great!, you are all done and probably smiling at your twitter timeline and followers updating automagically. Anyway if you have or faced any issues following the steps above that you cannot fix, no worries, send an email to "email@example.com" or use the "CONTACT ME" link above to email me and please remember to be thorough in telling me exactly what went wrong, thanks for your time, Happy Scripting!