Skip to content

Instantly share code, notes, and snippets.

@aritraroy24
Created June 4, 2021 14:31
Show Gist options
  • Save aritraroy24/e7337639360573234d05657435703666 to your computer and use it in GitHub Desktop.
Save aritraroy24/e7337639360573234d05657435703666 to your computer and use it in GitHub Desktop.
authorise you to use Twitter as a developer
# Keys
CONSUMER_KEY = os.environ['Consumer_Key']
CONSUMER_SECRET_KEY = os.environ['Consumer_Secret_Key']
ACCESS_TOKEN = os.environ['Access_Token']
ACCESS_TOKEN_SECRET = os.environ['Access_Token_Secret']
# Authentication
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET_KEY)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
api = tweepy.API(auth)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment