Relatively new to the Twitter API and such, but I am using Tweepy to try and pull down a list of followers of one account. This is the code I ran, with privatekey.py linking to my API credentials:
import tweepy
import privatekey
from tweepy.auth import OAuthHandler
auth = OAuthHandler(privatekey.TWITTER_APP_KEY, privatekey.TWITTER_APP_SECRET)
auth.set_acces_token(privatekey.TWITTER_KEY, privatekey.TWITTER_SECRET)
api = tweepy.API(auth)
def get_followers(api, username):
get_followers(api, "harrispolicy")
`
I have verified that Tweepy 3.8.0 is installed. However, I keep receiving this error:
File "<ipython-input-38-a0f5125f5961>", line 4, in <module>
from tweepy.auth import OAuthHandler
ModuleNotFoundError: No module named 'tweepy.auth'
Any advice regarding why this is occurring would be appreciated!
2
Answers
I had the same problem so I also import auth.
use this instead