A set of Python utility scripts for Twitter account management, using Tweepy.
Based on various Tweepy snippets found online. See CONTRIBUTING.md for the credits and details on how to contribute.
First the Twitter developer setup:
- Create a Twitter app at https://dev.twitter.com/apps.
- Grant your Twitter app read/write privileges.
- Create an access token.
Then install tweepy-utils from the Python Package Index:
$ mkvirtualenv tweepy-utils
$ pip install tweepy-utils
$ mkdir tweepy-utils-data
$ cd tweepy-utils-data
$ cp config.ini.example config.ini
Finally open config.ini and add:
- Your Twitter username
- API key/secret
- Access token/secret
List people who don't follow back:
$ list-nonfollowers.py
Unfollow people who don't follow back:
$ unfollow-nonfollowers.py
If you have multiple Twitter accounts, create a your-twitter-username.ini
file for each account.
Then use the -c argument to run a script with a particular .ini file:
$ list-nonfollowers.py -c your-twitter-username.ini
$ unfollow-nonfollowers.py -c your-twitter-username.ini