forked from pavelk2/social-feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
140 lines (129 loc) · 5.17 KB
/
index.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<!-- Social-feed css -->
<link href="css/example.css" rel="stylesheet" type="text/css">
<link href="css/jquery.socialfeed.css" rel="stylesheet" type="text/css">
<!-- font-awesome for social network icons -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'>
<!-- This style is needed only for the plugin demo page. Do not use it in your projects -->
</head>
<body>
<section class="intro">
<div class="container">
<h1>social-feed.js</h1>
<hr/>
<p>jQuery plugin which displays posts by a username or a hashtag from the popular social networks:
<br/><i>Facebook</i>, <i>Instagram</i>, <i>Twitter</i>, <i>Google+</i>, <i>VK</i>.
</p>
<hr/>
<div class="controls">
<a href='https://github.com/pavelk2/social-feed/' target='_blank' class='button'><i class="fa fa-github"></i> Get Started</a>
</div>
</div>
</section>
<section class="stripe">
<div class="container field">
<input type="text" class="input field-left" value="@elonmusk, #elonmusk" id="query">
<button class='button field-right' id="button-update"><i class="fa fa-refresh"></i>
</button>
</div>
</section>
<section class="feed">
<div class="container">
<!--div class="controls">
<input type="field" value="#dolomiti" id="query" />
<input type="button" value="Update" />
</div-->
<div class="social-feed-container">
</div>
</div>
</section>
<!-- jQuery -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Codebird.js - required for TWITTER -->
<script src="bower_components/codebird-js/codebird.js"></script>
<!-- doT.js for rendering templates -->
<script src="bower_components/doT/doT.min.js"></script>
<!-- Moment.js for showing "time ago" -->
<script src="bower_components/moment/min/moment.min.js"></script>
<!-- Social-feed js -->
<script src="js/jquery.socialfeed.js"></script>
<script>
$(document).ready(function() {
var updateFeed = function() {
var initialQuery = $('#query').val();
initialQuery = initialQuery.replace(" ", "");
var queryTags = initialQuery.split(",");
$('.social-feed-container').socialfeed({
// FACEBOOK
facebook: {
accounts: queryTags,
limit: 2,
access_token: '150849908413827|a20e87978f1ac491a0c4a721c961b68c'
},
// GOOGLEPLUS
google: {
accounts: queryTags,
limit: 2,
access_token: 'AIzaSyDpNQcIwQf5TcKmI8B0rh3e4OodIywJP14'
},
// Twitter
twitter: {
accounts: queryTags,
limit: 2,
consumer_key: 'qzRXgkI7enflNJH1lWFvujT2P', // make sure to have your app read-only
consumer_secret: '8e7E7gHuTwyDHw9lGQFO73FcUwz9YozT37lEvZulMq8FXaPl8O', // make sure to have your app read-only
},
// VKONTAKTE
vk: {
accounts: queryTags,
limit: 2,
source: 'all'
},
// INSTAGRAM
instagram: {
accounts: queryTags,
limit: 2,
client_id: '88b4730e0e2c4b2f8a09a6184af2e218'
},
// GENERAL SETTINGS
length: 200,
show_media: true,
// Moderation function - if returns false, template will have class hidden
moderation: function(content) {
return (content.text) ? content.text.indexOf('fuck') == -1 : true;
},
//update_period: 5000,
// When all the posts are collected and displayed - this function is evoked
callback: function() {
console.log('all posts are collected');
}
});
};
updateFeed();
$('#button-update').click(function() {
updateFeed();
});
});
</script>
<!-- Remove this part on your website. This is only to track the popularity of the Social-feed plugin website-->
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-59783367-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>