开发者

OAuth for Internal Twitter Feeds

开发者 https://www.devze.com 2022-12-08 04:28 出处:网络
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开发者_如何学Python have some little

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开发者_如何学Python 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.


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!


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! :)

0

精彩评论

暂无评论...
验证码 换一张
取 消