Created
December 14, 2011 00:03
-
-
Save phlipper/1474558 to your computer and use it in GitHub Desktop.
a quick demo of how to use the twitter json info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JS Test</title> | |
</head> | |
<body id="" onload=""> | |
<div id="results"></div> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script> | |
var jsonUrl = "http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&urls=www.kidsruby.com&format=json&callback=?"; | |
$.getJSON(jsonUrl, function(data) { | |
$("#results").html("Like Count: " + data[0].like_count); | |
}); | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JS Test</title> | |
</head> | |
<body id="" onload=""> | |
<div id="results"></div> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script> | |
var jsonUrl = "http://urls.api.twitter.com/1/urls/count.json?url=www.kidsruby.com&callback=?"; | |
$.getJSON(jsonUrl, function(data) { | |
$("#results").html("Followers: " + data.count); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment