Skip to content

Instantly share code, notes, and snippets.

@pavelk2
Created March 17, 2015 23:00
Show Gist options
  • Save pavelk2/18e5c8bbd11f8632114c to your computer and use it in GitHub Desktop.
Save pavelk2/18e5c8bbd11f8632114c to your computer and use it in GitHub Desktop.
<script>
$(document).ready(function(){
$('.social-feed-container').socialfeed({
// FACEBOOK
facebook:{
accounts: ['@teslamotors','#teslamotors'],
limit: 2,
access_token: 'YOUR_FACEBOOK_ACCESS_TOKEN' // APP_ID|APP_SECRET
},
// TWITTER
twitter:{
accounts: ['@spacex'],
limit: 2,
consumer_key: 'YOUR_CONSUMER_KEY', // make sure to have your app read-only
consumer_secret: 'YOUR_CONSUMER_SECRET_KEY', // make sure to have your app read-only
},
// VK
vk:{
accounts: ['@125936523','#teslamotors'],
limit: 2,
source: 'all'
},
// GOOGLEPLUS
google:{
accounts: ['#teslamotors'],
limit: 2,
access_token: 'YOUR_GOOGLE_PLUS_ACCESS_TOKEN'
},
// INSTAGRAM
instagram:{
accounts: ['@teslamotors','#teslamotors'],
limit:2,
client_id: 'YOUR_INSTAGRAM_CLIENT_ID'
},
// BLOGSPOT
/*blogspot:{
accounts:['@iman-khaghanifar']
},*/
// GENERAL SETTINGS
length:400,
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');
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment