Hello, thanks for your help, I want to find a twitter user thanks to tweepy, I have already tried to generate a new key, I've also tried with a token, but it says:
Error:"Traceback (most recent call last):
File "C:/Users/enora/PycharmProjects/untitled2/Cluedo1.py", line 33, in <module>
user = api.get_user(screen_name = 'suspect_jean_michel')
File "C:\Python34\lib\site-packages\tweepy\binder.py", line 245, in _call
return method.execute()
File "C:\Python34\lib\site-packages\tweepy\binder.py", line 229, in execute
raise TweepError(error_msg, resp, api_code=api_error_code)
tweepy.error.TweepError: [{'code': 89, 'message': 'Invalid or expired token.'}]"
Here is my code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#importer les modules import googlemaps import tweepy import urllib.request import json from tweepy import API #authentification twitter consumer_key = "REMOVEDl" key = consumer_key consumer_secret = "REMOVED" secret = consumer_secret auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(key, secret) api = tweepy.API(auth) user = api.get_user(screen_name = 'suspect_jean_michel' ) |