Created
July 24, 2020 08:53
-
-
Save ferblape/f6bec9fc1f135d47807c5064c708f642 to your computer and use it in GitHub Desktop.
Disable all your contact retweets
This file contains 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" | |
# 1. Go to https://developer.twitter.com/en/apps | |
# 2. Create a new app with write permission | |
# 3. Copy and paste the tokens | |
API_KEY = "" | |
API_SECRET = "" | |
ACCESS_TOKEN = "" | |
ACCESS_TOKEN_SECRET = "" | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = API_KEY | |
config.consumer_secret = API_SECRET | |
config.access_token = ACCESS_TOKEN | |
config.access_token_secret = ACCESS_TOKEN_SECRET | |
end | |
client.friend_ids.each do |id| | |
client.friendship_update(id, device: false, retweets: false) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment