This is the simplest twitter bot for retweet.
tweepy
install via pip
sudo pip install tweepy
-
First create App on twitter.
Visit: http://apps.twitter.com
You need a twiter account for this. -
Generate consumer_key, consumer_secret, access_token, access_token_secret.
How to generate Auth token : https://github.com/surya-veer/TwitterBot/blob/master/HOW_TO_GENETARE_TOKEN.md
- Download
retweet.py
form my repository. - Now exit
retweet.py
and enter your consumer_key, consumer_secret, access_token, access_token_secret in this script. - Finally run retweet.py
You can increase hash_tag
in hast_tag for retweets.
Example:
hash_tag = ['exmaple']
edit:
hash_tag = ['example','example2']
Now for
loop will automatically itrate hash_tag
You can set retweet time by changing retweet_time
in TweetBot
class
If you want to run this script for a long time then you can uncomment tweet.loop_retweet()
at the end of script. You can aslo specify the time of loop by changing loop_retweet_time
in TweetBot
class.