knx.to/twtr

API Console

Welcome to a demonstration of our dead-simple knx.to/twtr (pronounced “Connects to Twitter”) library. Our goal is to make OAuth even easier to use than BASIC (password) authentication.

  1. Create your own Twitter application’s API Key and set the Callback URL to http://mmc.angstro.com/knx/twitterOAuthCallback.php.
  2. Link to our Javascript library http://mmc.angstro.com/knx/knx_to_twitter.js from your own Web page.
  3. Copy our cross-domain handler knx_receiver.html to your own Web server.
  4. Register that URL and your Twitter API keys at our secure knx.to/twtr database.

That’s it. Now all you have to do is create a “Sign in” button for users to click before calling Twitter’s API (it needs to be tied to a mouse click event because it opens a pop-up window for OAuth). View Source on this page for an example...

Try posting a Tweet yourself by selecting statuses/update from the drop-down menu. (Unfortunately, JSONP doesn’t play nicely with Twitter's insistence on HTTP POST, so you may get a downloaded JS file to discard, but it will appear in your timeline.)


{"output": "json"}