Reputation: 379
I used import twitter
and then tried authenticating using the following command - Twitter(auth=OAuth(access_token, access_token_secret, consumer_key, secret_key))
On running the program I get the error: name Twitter not defined. When I use from twitter import *
, it works. Why is it so?
I am asking this because if i use tweepy instead, a simple import tweepy
works. Also, doesn't import twitter
work the same as from twitter import *
?
Upvotes: 0
Views: 46
Reputation: 342
Try twitter.Twitter (auth=OAuth(access_token, access_token_secret, consumer_key, secret_key))
Upvotes: 2