forked from uzbekjon/jTwitter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
50 lines (47 loc) · 1.46 KB
/
test.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
<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.4.1");
</script>
<script type="text/javascript" src="jquery.jtwitter.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Get latest 6 tweets by jQueryHowto
$.jTwitter('jQueryHowto', 10, function(data){
$('#posts').empty();
$.each(data, function(i, post){
$('#posts').append(
'<div class="post">'
+' <div class="txt">'
// See output-demo.js file for details
+ post.text
+' </div>'
+'</div>'
);
});
});
// Get latest 6 search results matching @electricpulp
$.jTwitterSearch('+%40electricpulp+OR+%22electric+pulp%22', 6, function(data){
$('#search-posts').empty();
$.each(data.results, function(i, post){
$('#search-posts').append(
'<div class="post">'
+' <div class="txt">'
// See output-demo-search.js file for details
+ post.text
+' </div>'
+'</div>'
);
});
});
});
</script>
</head>
<body>
<h1>jQuery Howto's Tweets</h1>
<div id="posts">Getting your tweets...</div>
<h1>"@electricpulp" Mentions</h1>
<div id="search-posts">Getting your tweets...</div>
</body>
</html>