Reputation: 3047
Using Twython, how do I get a single tweet using just the tweet ID_STR?
I know I can call it like this (TwitterDocuentation)
"https://api.twitter.com/1/statuses/show.json?id=112652479837110273"
but I keep running into return code 400 errors when attempting to call it in twython with the request() method. I was trying to do something similar to calling the showStatus endpoint
tweet = twitter.request(endpoint='showStatus')
but that doesn't seem to let me plugin the ID_STR param (or I'm just plainly doing it wrong)
tweet = twitter.request(endpoint='showStatus',
params={id:'112652479837110273'})
How can I do this with just the tweet ID and Twython?
Upvotes: 1
Views: 4579
Reputation: 230
If you are still trying to do this here in 2014, the code now is:
twitter.statuses.show(id="126415614616154112")
If that doesn't work, check on: https://dev.twitter.com/docs/api/1/get/statuses/show/%3Aid Twitter keeps updating their API.
Upvotes: 1
Reputation: 196
Twython doesn't have showStatus method , it should be (show_status)
status = twitter.show_status(id="112652479837110273")
Ref: https://github.com/ryanmcgrath/twython/blob/master/tests/test_core.py line 147
Upvotes: 3
Reputation: 9110
This is how to do it:
status = twitter.showStatus(id="112652479837110273")
print status['text']
with the result:
@twitter meets @seepicturely at #tcdisrupt cc.@boscomonkey @episod http://t.co/6J2EgYM
Upvotes: 2