social-feed
social-feed copied to clipboard
Limit option not working
I was able to get this plugin to work. But, the problem is that the limit option isn't working. It only shows 1 post per social media. Here's my Website
please control your code!
$('#twitter-feed').socialfeed({
twitter:{
accounts: ['@makz3l'],
limit: 2,
consumer_key: 'b8rmXVEk80lq1ZaEJGzaa2tJ9',
consumer_secret: 'CKBVarVdKn42qZLlDJxbJhG1mUrqfZjNnBfjcgvqNVgyo0Ffdv',
},
length:400,
show_media: true
})
after consumer_secret variable you put a comma that is an error!
So I tried taking it off and it still won't work. 🤔
I'm experiencing same issue here.... My limit is set for 3, and is fetching all my twitter posts... this is my code used and I can't see what is wrong with that
`
twitter:{
accounts: ['@ofelicidade'], //Array: Specify a list of accounts from which to pull tweets
limit: 3, //Integer: max number of tweets to load
consumer_key: 'zMPthMTv3JPcoRPn7RqpsPGxY', //String: consumer key. make sure to have your app read-only
consumer_secret: 'H67wZhnriKeLOGNcbHIWzocx1XdgbQkfbkuFJ7dSMJ1kr7fzBx',//String: consumer secret key. make sure to have your app read-only
},
// GENERAL SETTINGS
length:400, //Integer: For posts with text longer than this length, show an ellipsis.
show_media:true, //Boolean: if false, doesn't display any post images
media_min_width: 300, //Integer: Only get posts with images larger than this value
update_period: 5000, //Integer: Number of seconds before social-feed will attempt to load new posts.
template_html: //String: HTML used for each post. This overrides the 'template' filename option
'<article class="twitter-post"> \
<h4>{{=it.author_name}}</h4><p>{{=it.text}} \
<a href="{{=it.link}}" target="_blank">read more</a> \
</p> \
</article>',
date_format: "lll", //String: Display format of the date attribute (see http://momentjs.com/docs/#/displaying/format/)
moderation: function(content) { //Function: if returns false, template will have class hidden
return (content.text) ? content.text.indexOf('fuck') == -1 : true;
},
callback: function() { //Function: This is a callback function which is evoked when all the posts are collected and displayed
console.log("All posts collected!");
}
`
Mind to help me here?
Cheers =)
It starts ok.... only fetch the last 3 posts.... but, then, keeps fetching all the posts ((luckily, i'm personally not a twitter person, and stops in a few seconds)),....
It seems this issue relays on this setting
' update_period: 5000,'
If I remove it, the plugin stops to fetch all tweets and stop...
try to remove:
media_min_width: 300, //Integer: Only get posts with images larger than this value
update_period: 5000, //Integer: Number of seconds before social-feed will attempt to load new posts.
So how do I fix the limit option :)
@HartLarsson ... Actually I already removed... i just posted it here to let you know there is more than 1 person dealing with the same situation =D
I still couldn't find a solution to the limit issue.
Still no solution? :|
i tested your code @tofanelli and i obtained 3 tweets as expected:
i'm using my forked version with new rendering engine: https://github.com/HartLarsson/social-feed Also with original latest code is working.Is for me impossible to reproduce your problem.