-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitter-FUN.html
43 lines (38 loc) · 1.24 KB
/
twitter-FUN.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
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
p {
font-family: Verdana,Arial,sans-serif;
font-size: 12px;
}
</style>
</head>
<body>
<script type="text/javascript">
$.getJSON('http://search.twitter.com/search.json?q=juniper&result_type=recent&page=1&rpp=100&callback=?',function(data){
console.log(data.completed_in);
console.log(data);
$.each(data.results,function(i,item){
//$("#twitterData").append('<p><b>' + item.from_user + ' </b>' + item.text + '</p>').addClass('small');
var info;
info = {
user: item.from_user,
text: item.text
};
$.ajax({
type: 'PUT',
url: 'http://localhost:5984/pants',
data: info,
success: function() {
alert('hooray');
}
})
});
});
</script>
<div id="twitterData">
</div>
</body>
</html>