Forum Archive

Twitter API

julio.guzman

Hi! Has anyone managed to install requests_oauthlib module with pythonista or get to work with the Twitter API?

ccc

See djbouche's TweetBot work: http://omz-forums.appspot.com/pythonista/post/6471381843705856

julio.guzman

Thank you! But I was expecting an stand alone implementation.

ccc

For a standalone implementation, check out recent_tweets.py at https://gist.github.com/cclauss/8391840

recent_tweets('olemoritz', 5) will call the Twitter v1.1 REST API and print out our fearless leader's five most recent tweets.

It does not use OAuth but instead uses a Twitter "Bearer Token" which you get for free when you create a new application on https://dev.twitter.com There are restrictions on the Twitter Application Permission Model but it seems pretty flexible for something that you get for free.

julio.guzman

Great implementation. Thanks for the links, I have it up and running.