Quote:
Originally Posted by Airblader
|
thanks for that - I'm aware the API uses 'rpp=n' for the number of tweets to be displayed I'd like however to add it to the script I have found above.
Okay apologies I'm tired and a newbie to java and using api#s i've since added the parameter to the URL:
$.getJSON('http://search.twitter.com/search.json?q=uspca&lang=en&rpp=5&callback=?', function(data) {
Full script is;
Code:
<script type="text/javascript">
$(document).ready(function() {
$.getJSON('http://search.twitter.com/search.json?q=uspca&lang=en&rpp=5&callback=?', function(data) {
var data = data.results;
var html = '<ul class="list-how-works">';
for(var i=0; i<data.length; i++) {
html += "<li><a href='http://twitter.com/" + data[i].from_user + "'>@"
+ data[i].from_user + "</a>: " + data[i].text + "</li>";
}
html += "</ul>"
$('.twitter-info').html(html);
});
});
</script>