/ Published in: jQuery
Expand |
Embed | Plain Text
<html> <head> <title>JSON Example</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script type="text/javascript"> function getTweet(){ $.getJSON("http://twitter.com/status/user_timeline/uniofgreenwich.json?count=1&callback=?", function(data){ $("#twitter").html("<a href='http://twitter.com/#!/uniofgreenwich/status/"+data[0].id_str+"'>" + data[0].text + "</a>"); }); } $(document).ready(function(){ getTweet(); }); </script> </head> <body> <p id="twitter"></p> </body> </html>
You need to login to post a comment.
