/MicTwi.js

Make AJAX requests to twitter's REST APIs. Although the official "@Anywhere" does pretty much the same thing, I made it anyway 'coz I simply didn't know <i>that</i>. I just didn't wanna throw it away so I'm pushin' it!

Primary LanguageJavaScriptDo What The F*ck You Want To Public LicenseWTFPL

#MicTwi.js and its OAuth proxy server

##Use it!

<script src="https://raw.github.com/ympbyc/MicTwi.js/MicTwi/mictwi.js"></script>

<script type="text/javascript">
MicTwi.oauth(function(){
  var tweet = MicTwi.generatePostAPI('statuses/update');
  tweet({status: "whatever"}, function(j){console.log(j)});
});
</script>

##Installation

  • register an application at http://dev.twitter.com/
  • replace certain keys in /tofucha/server.js.
  • install node and npm to your server, then
npm install express
  npm install oauth 
  • push /tofucha to your server and let it run server.js on node.
  • host /MicTwi/mictwi.js wherever you prefer.
  • in your html, include a <script> tag pointing your mictwi.js.

##Usage example

(MicTwi.generatePostAPI('statuses/update.json'))({status: 'Posting via MicTwi'}, function(json){alert(json)});

##Author ympbyc

##License wtfpl

##Simple demo http://ympbyc.kuronowish.com/akarin/mictwi.html