Posted By

selfmadepsyche on 02/20/09


Tagged

html twitter


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

FlamesOfDestiny
fabianwizenfeld
loric


Embed Twitter Status


 / Published in: JavaScript
 

  1. <div id="twitter" class="container">
  2. <a href="http://twitter.com/snookca"><img src="/img/twitter.png" alt="Follow me on Twitter"></a>
  3. <p><a id="twitter-post"
  4. href="http://twitter.com/snookca">I say witty things on Twitter.</a></p>
  5. </div>
  6.  
  7. function twitterCallback(o) {
  8. o = o[0]; // o is always an array, so just get the first (and only entry)
  9. var e = document.getElementById('twitter-post');
  10. e.innerHTML = o.text;
  11. e.href = 'http://twitter.com/snookca/status/' + o.id;
  12. }

Report this snippet  

You need to login to post a comment.