There are a lot of applications out there to help manage your twitter account. Much of what these applications have to offer can be achieved with very little python code. For example, say you want to find out who is following you that you’re not following. Alternately, say you want to find out who you’re following, but who isn’t following you in return. You can find this information out easily with python-twitter and a few lines of code.
[python]
#!/usr/bin/env python
import twitter
if __name__ == ‘__main__’:
api = twitter.Api(username=’username’, password=’password’)
i_follow = api.GetFriends()
follow_me = api.GetFollowers()
i = [u.name for u in i_follow]
f = [u.name for u in follow_me]
i_should_follow = [n for n in f if n not in i]
i_should_drop = [n for n in i if n not in f]
print ‘I follow:’
print ‘\n’.join(i)
print
print ‘Following me:’
print ‘\n’.join(f)
print
print ‘I should consider following:’
print ‘\n’.join(i_should_follow)
print
print ‘I should consider not following:’
print ‘\n’.join(i_should_drop)
print
[/python]
Replace the dummy user name and password and give it a go.
Dont think the code gets all the followers and following
because twitter limits the number to about 100 or so.
Great concise code though 🙂