Created
June 22, 2012 01:05
-
-
Save brenthall/2969631 to your computer and use it in GitHub Desktop.
Show User Tweets: Renders specified number of latest tweets for specified user
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
<#macro tweets username, count = 5, include_rts=true> | |
<#local callbackFn = "twitterCallback_" + username + "_" + count?c/> | |
<#local layout> | |
<#nested/> | |
</#local> | |
<script type="text/javascript"> | |
function ${ | |
callbackFn} | |
(json) { | |
var template = "${layout?replace('"', '\\"')?replace("\n", "")?replace("\r", "")}"; | |
twitterCallback(json, template); | |
} | |
</script> | |
<script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=${username}&callback=${callbackFn}&count=${count}&include_rts=${include_rts?string}"> | |
</script> | |
</#macro> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment