Closed Flipp3rrr closed 4 years ago
Are you putting the keys/tokens in a list []? They should be the strings like here https://github.com/bear/python-twitter/blob/master/examples/view_friends.py On Sep 26, 2019, 12:26 PM -0700, Flipp3rrr notifications@github.com, wrote:
Problem When I tried using this library for my Twitter application I immediately ran into problems; tons of errors. I have put the code and error log below. Code import twitter
api = twitter.Api(consumer_key=["NO U"], consumer_secret=["NO U"], access_token_key=["NO U"], access_token_secret=["NO U"])
statuses = api.GetUserTimeline(screen_name="Flipp3rrr") print([s.text for s in statuses]) NB: In the real script "NO U" is replaced with the token. Error log https://pastebin.com/RHTfT7Z5 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@jeremylow I used it like this:
api = twitter.Api(consumer_key=["asdfasdf123"],
consumer_secret=["asdfasdf123"],
access_token_key=["asdfasdf123"],
access_token_secret=["asdfasdf123"])
Is this incorrect?
Based on the example given, yes that is incorrect. Try this? (I used single quotes for consistency with the example code)
api = twitter.Api(consumer_key='asdfasdf123',
consumer_secret='asdfasdf123',
access_token_key='asdfasdf123',
access_token_secret='asdfasdf123')
Yeah, that's how it should be run.
Problem
When I tried using this library for my Twitter application I immediately ran into problems; tons of errors. I have put the code and error log below.
Code
NB: In the real script "NO U" is replaced with the token.
Error log
https://pastebin.com/RHTfT7Z5