views:

276

answers:

2

Still trying to wrap my noggin around OAuth, but I have a question.

I have some twitter accounts that are solely for internal use, build server output, etc. and I have some little bash and python scripts that let me publish updates from jobs and stuff.

For this type of use case, does OAuth make sense? I ask because part of the OAuth process is the display of the twitter webpage which lets a use put their login and password into twitter itself to authenticate that application.

How should I handle this for a twitter feed that's completely automatic. My build server isn't going to be able to type in the username and password into the twitter website.

+1  A: 

James, based on the following site, I believe you can just grab your token pair from Twitter's Oauth servers and save those on your build server. Then you just use those in the future when you need to authenticate: http://kovshenin.com/archives/automatic-tweet-oauth/

To clarify,

  • First create a web page that you manually use to log into Twitter via OAuth and make that page show you your authentication tokens.

  • Next save those in a file your build scripts can use/parse and have them use that data to tweet.

Good luck man!

Justin Bozonier
+1  A: 

If you control both the application using the credentials and the account whose credentials are being used, there's no plainly obvious reason to use OAuth. The less obvious reasons to use it would be:

  • List item you want the tweet source (from <yourappname>) and link to reflect the source of the tweet

  • some day twitter might turn off basic auth which will force you to switch over

Other than those two things, for the situation you describe, OAuth doesn't offer a whole lot. Of course, if you're already using it, there's no reason to switch back to basic, either.

Lastly, apps that access twitter on behalf of other people: USE OAUTH DAMMIT! :)

Jason Diller