Skip to content

Instantly share code, notes, and snippets.

@AnasAlmasri
Last active June 1, 2022 06:08
Show Gist options
  • Save AnasAlmasri/e7850892aec4d0af38f37973901b51be to your computer and use it in GitHub Desktop.
Save AnasAlmasri/e7850892aec4d0af38f37973901b51be to your computer and use it in GitHub Desktop.
import twitter
# initialize api instance
twitter_api = twitter.Api(consumer_key='YOUR_CONSUMER_KEY',
consumer_secret='YOUR_CONSUMER_SECRET',
access_token_key='YOUR_ACCESS_TOKEN_KEY',
access_token_secret='YOUR_ACCESS_TOKEN_SECRET')
# test authentication
print(twitter_api.VerifyCredentials())
@Irfan-Khursheed
Copy link

Irfan-Khursheed commented Jul 16, 2020

AttributeError: module 'twitter' had no attribute 'Api'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment