How to make a twitter bot using python

First go to and create a new application. Go to Permissions tab and make you that you have read and write access for your application. Then request the access tokens in the Key and Access Tokens tab.

See my previous post about the basic setup.

  • To make a new tweet:
mypost = 'This is my new tweet'
  • To follow back every follower:
for follower in tweepy.Cursor(api.followers).items():
  • Add a cron task every 3 hours o'clock:
    • Edit your cron
crontab -e

Check cron help at arch linux.

0 */3 * * * /usr/bin/python /path/to/

Latest posts