Hello, I have a webapp that uses tweepy to gather and analyze tweets from Twitter. The app works fine on my local computer, but when I try to run it on PythonAnywere I get the following error:
tweepy.error.TweepError: Not authorized.
Here are the basics of the code:
consumer_key = 'my_private_consumer_key'
consumer_secret = 'my_private_consumer_secret'
access_token = 'my_private_access_token'
access_token_secret = 'my_private_access_token_secret'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth,wait_on_rate_limit=True)
tweets = api.user_timeline(accountName, page=1, tweet_mode="extended")
As I said, it works fine when run from my computer, so I know my tokens and keys are ok. Is there an extra authorization required for a web app on the PythonAnywhere server, or am I missing something else?
Thank you!