Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active August 15, 2020 05:19
Show Gist options
  • Save aniruddha27/49362ce9ee342ffaa835d71d90199416 to your computer and use it in GitHub Desktop.
Save aniruddha27/49362ce9ee342ffaa835d71d90199416 to your computer and use it in GitHub Desktop.
# Twitter API authentication
import tweepy
api_key = # api_key
api_secret_key = # api_secret_key
access_token = # access_token
access_token_secret = # access_token_secret
# authorize the API Key
authentication = tweepy.OAuthHandler(api_key, api_secret_key)
# authorization to user's access token and access token secret
authentication.set_access_token(access_token, access_token_secret)
# call the api
api = tweepy.API(authentication)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment