Skip to content

Instantly share code, notes, and snippets.

@d7my11
Created July 21, 2015 12:35
Show Gist options
  • Save d7my11/02e21a78d478cbf19d8f to your computer and use it in GitHub Desktop.
Save d7my11/02e21a78d478cbf19d8f to your computer and use it in GitHub Desktop.
import tweepy
import random
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN = ''
ACCESS_TOKEN_SECRET = ''
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
api = tweepy.API(auth)
favorites = api.favorites()
to_unfavorites = random.choice(favorites)
api.destroy_favorite(to_unfavorite.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment