social-feed icon indicating copy to clipboard operation
social-feed copied to clipboard

Limit option not working

Open makz3l opened this issue 8 years ago • 11 comments

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

makz3l avatar Sep 21 '16 04:09 makz3l

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!

HartLarsson avatar Sep 21 '16 11:09 HartLarsson

So I tried taking it off and it still won't work. 🤔

makz3l avatar Sep 21 '16 13:09 makz3l

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 =)

tofanelli avatar Sep 22 '16 03:09 tofanelli

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)),....

tofanelli avatar Sep 22 '16 03:09 tofanelli

It seems this issue relays on this setting

' update_period: 5000,'

If I remove it, the plugin stops to fetch all tweets and stop...

tofanelli avatar Sep 22 '16 03:09 tofanelli

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.

HartLarsson avatar Sep 22 '16 15:09 HartLarsson

So how do I fix the limit option :)

makz3l avatar Sep 25 '16 21:09 makz3l

@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

tofanelli avatar Sep 27 '16 01:09 tofanelli

I still couldn't find a solution to the limit issue.

makz3l avatar Oct 02 '16 21:10 makz3l

Still no solution? :|

makz3l avatar Nov 08 '16 21:11 makz3l

i tested your code @tofanelli and i obtained 3 tweets as expected:

image

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.

HartLarsson avatar Nov 09 '16 11:11 HartLarsson