/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div id="twitter" class="container"> <a href="http://twitter.com/snookca"><img src="/img/twitter.png" alt="Follow me on Twitter"></a> <p><a id="twitter-post" href="http://twitter.com/snookca">I say witty things on Twitter.</a></p> </div> function twitterCallback(o) { o = o[0]; // o is always an array, so just get the first (and only entry) var e = document.getElementById('twitter-post'); e.innerHTML = o.text; e.href = 'http://twitter.com/snookca/status/' + o.id; }
Comments
