Hack Forums
[Python] Tweepy API question - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Tweepy API question (/showthread.php?tid=5590861)



Tweepy API question - alexaggs - Apr 2, 2017

So if any of you are familiar with the tweepy API and would like to help I'd appreciate it. Basically, I want to grab tweets from another user that isnt me. I'm trying to do this by doing...

Code
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)


for word in tweepy.Cursor(api.user_timeline, screen_name = some screen name):

but this just does not work for me. Does anyone know why?


* - Charger - Apr 2, 2017

Probably because you haven't put your OAUTH details in.


* - alexaggs - Apr 2, 2017

From my knowledge I believe I put all the necessary ones in but I can be totally wrong. Ill post my code above as well

Edit: Now that I think of it I may be missing some OAUTH details. If anyone knows what that'd be very helpful