Comparing user's facebook/twitter friends to site's users in Python/Django
You should store the twitter user's ID because the username can change at any time, but the id will always be the same.  You should be comparing the id's, not the usernames in the intersection_set that Ofri recommends.
I'm wondering if someone could help guide the approach to this fairly common problem:
I'm building a simple site which a user connects their twitter account to sign up. I'd like to create an interface which shows them which of their twitter friends are already using the site.
So I can get a list the user's twitter friends, and a list of the site's users (which all have the twitter screen name as username, but I'm wondering the most efficient method to compare these lists and create a variable with the commonalities.
As an aside, given the Twitter API returns IDs, should I save the twitter user's ID (in addition to their username) when they create an account?
Thanks in advance!