5 ms·
Twitter from the command line in Python using OAuth - step-by-step howto
- paulgb 16y agoThanks Jeff, this is exactly what I've been looking for. I found out about twitter killing basic auth today, but all the documentation seems to assume you have a web app. I just run a simple RSS scraper to twitter feed script on a cron job, so this is helpful.
- mshafrir 16y agoOnce I have generated an ACCESS_KEY and ACCESS_SECRET, when will they expire? Is there any way to programmatically grant/approve OAuth access so that expired access key and access secret can be generated as needed?
- jmillerinc 16y agoTwitter says they "do not currently expire access tokens." http://apiwiki.twitter.com/OAuth-FAQ http://apiwiki.twitter.com/OAuth-FAQ Who knows what they will do in the future. I don't know of any easy way to programatically grant OAuth access.
- cmelbye 16y agoI wonder how difficult it would be to implement xAuth. Presumably, the configuration for username/password could be left intact because xAuth is performed by giving the username/password.
- ck2 16y agoAfter setting up Twitter which uses OAuth 1.0, try Facebook's OAuth 2.0 - it's amazingly easy in comparison since it doesn't use secrets, simply relying on HTTPS's SSL encryption instead. http://developers.facebook.com/docs/authentication/ http://developers.facebook.com/docs/authentication/ Soooo much easier.
- pilif 16y agoThis just goes to show how badly suited OAuth is for desktop applications: Basically, what ever you do, you will need to direct your users over to a browser (or embed one) and they'll have to deal with strange "passcodes" or whatever you want to call it. This is much more difficult for a user to understand ("why can I give twitter my password, but in this client here, I have to do this strange dance? What am I supposed to do now?"). In most of the client apps, the issue of having to enter your password is a non-issue as there's no need for a third-party to know it. In the case of desktop apps, IMHO, OAuth does nothing but makes the lives of both client developers and users harder.
- hboon 16y agoThere's XAuth which helps with this issue so that opening a browser is not needed.
- semanticist 16y agoYes, but you need to ask Twitter nicely to see if they'll let you use it.
- hboon 16y agoIt looks like they'll grant it if you have a mobile app. (I do and they did).
- jot 16y agoTwitter have released a nice curl-like tool for using OAuth on the command line, it's called twurl: http://github.com/marcel/twurl http://github.com/marcel/twurl