Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created April 27, 2020 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lakshay-arora/65f88c990f30090a1c104e082a42a855 to your computer and use it in GitHub Desktop.
Save lakshay-arora/65f88c990f30090a1c104e082a42a855 to your computer and use it in GitHub Desktop.
# import required libraries
import tweepy
import time
import pandas as pd
pd.set_option('display.max_colwidth', 1000)
# api key
api_key = "Enter API Key Here"
# api secret key
api_secret_key = "Enter API Secret Key Here."
# access token
access_token = "Enter Access Token Here"
# access token secret
access_token_secret = "Enter Access Token Secret Here."
# 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, wait_on_rate_limit=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment