Posts Tagged ‘Anywhere’

Anywhere: Twitter JavaScript API

Tuesday, June 22nd, 2010

1 month ago Chirp was made, the official conference for developers of Twitter. And there were several developments around the world Twitter. Among them, a new page for developers of Twitter: dev.twitter.com , where we see new tools. In which we focus, being the closest to the theme of the blog is @Anywhere . @Anywhere is a Javascript API that lets you integrate Twitter with your site in a few lines of Javascript. Before you start using it to register as a developer you provide an API key, for it is the call for an application registration Anywhere . After this step, we must only add to the headers of our web page calling this script:

<script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&v=1" type="text/javascript"></script>

Once you add this script are the way to initialize @ Anywhere is:

twttr.anywhere(function (T) {
// Your code here ...
});

As you can see it calls a function and pass a callback function with a parameter T (you can call it whatever you want). Which will be executed once the script loaded Twitter @ Anywhere. With this API, now you can do the following:

  • AutoLink Twitter usernames
  • Hovercards
  • Follow Buttons
  • Tweet Box
  • User Login

I invite you to the try. From Wisecodes are preparing some demos that you’ll use to teach during these weeks.