-
-
Save bturnbull/1002618 to your computer and use it in GitHub Desktop.
Quickly find out who among the people you follow are not following you back
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' | |
# You'll need to get this info from your Twitter Developer account | |
Twitter.configure do |config| | |
config.consumer_key = YOUR_CONSUMER_KEY | |
config.consumer_secret = YOUR_CONSUMER_SECRET | |
config.oauth_token = YOUR_OAUTH_TOKEN | |
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET | |
end | |
# Grab a collection of ids for your friends and your followers | |
friends = Twitter.friend_ids.ids | |
followers = Twitter.follower_ids.ids | |
# screen_names is a collection of users who you are following but are not following you back | |
screen_names = Twitter.users(*(friends - followers)).map(&:screen_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment