public
Last active — forked from code/anywhere.html

twitterhtml4

  • Download Gist
anywhere.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>index</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="mustache.js"></script>
<script type="text/javascript" src="app.js"></script>
<script src="http://platform.twitter.com/anywhere.js?id=napdReg8vmaMotIRoyrg&v=chirp_preview"></script>
 
<script type="text/javascript">
 
var tweet = "\
<li>\
<img class='profile-image' src='{{image_url}}' />\
<p class='text'>{{screenName}} {{{text}}}</p>\
<div class='clear'></div>\
</li>";
 
twttr.anywhere.config({
assetHost: 'twitter-anywhere.s3.amazonaws.com'
});
 
twttr.anywhere(function(T) {
 
T.User.current().homeTimeline().each(function(status) {
 
$("#timeline").append(Mustache.to_html(tweet, {
image_url: status.user.profileImageUrl,
screenName: status.user.screenName,
text: ify.clean(status.text)
}));
 
});
 
T.User.current().friends().each(function(friend) {
 
$("#following").append("<img src="+ friend.profileImageUrl +" />");
 
});
 
});
 
</script>
 
</head>
<body>
<div id="login"></div>
<ul id="timeline"></ul>
<div id="following"></div>
<div class="clear"></div>
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.