This is a simple set of scripts for managing people you're following on Twitter.
-
Create environment properties file
.env
with the following contentsCONSUMER_KEY="..." CONSUMER_SECRET="..." ACCESS_TOKEN_KEY="..." ACCESS_TOKEN_SECRET="..." TWITTER_USER_ID="..."
-
Source
.env
before using the scriptssource .env
-
Have a local MongoDB up and running, default setup is sufficient
-
Fetch friends with
fetch_twitter_friends.py
./fetch_twitter_friends.sh
-
Create text index for some fields in MongoDB
db.friends.createIndex( { description: "text", name: "text" } )
-
Un-follow everyone
./unfollow_twitter_friends.sh
-
Customize the query in script
refollow_twitter_friends.py
to re-follow some of them./refollow_twitter_friends.sh