Created
November 15, 2011 00:38
-
-
Save codeincontext/1365709 to your computer and use it in GitHub Desktop.
How many people are you following that aren't following you back on twitter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'twitter' | |
| require 'redis' | |
| Twitter.configure do |config| | |
| config.consumer_key = CONSUMER_KEY | |
| config.consumer_secret = CONSUMER_SECRET | |
| config.oauth_token = TOKEN | |
| config.oauth_token_secret = SECRET | |
| end | |
| friend_ids = Twitter.friend_ids('skattyadz')[:ids] | |
| follower_ids = Twitter.follower_ids('skattyadz')[:ids] | |
| puts "Following #{friend_ids.length}" | |
| puts "Followed by #{follower_ids.length}" | |
| non_following_friends = friend_ids - follower_ids | |
| puts "Following but not followed back by #{non_following_friends.length}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment