pavelk2 / social-feed

JavaScript plugin that shows a user feed from the most popular social networks
http://pavelk2.github.io/social-feed-example/
MIT License
962 stars 304 forks source link

update_period: not working as expected. #151

Open massonth opened 8 years ago

massonth commented 8 years ago

I'm not a good programmer but succeeded to install and to run the fantastic Social-Feed code with some improvement to get it work on a signage with auto-scrolling.

I believe there is an issue if update_period: is specified. The refresh is well done at the end of the period but the side effect is that the new posts are added to the previous one. I mean if I limit the Facebook posts to 1 (limit:1), I get with nor surprise, one post (say post A) from Facebook. But after update_period: is executed, social-feed updates the post for getting a new one (say post B). However, I get on the screen Post A & Post B. I would have expected to have only one post (the last one) displayed. Thanks again for you nice code that saved my life.

massonth commented 8 years ago

OK. I found a workaround. I create my own SetInterval and clean-up the DIV used to show the posts and reinitiate UpdateFeed() to get the last posts. Suggestion :

dwaynecodling commented 8 years ago

Hi There Please can you explain how you did this as I cant find out when social feed actual updates ad i have comment out the //update_period: 5000, as it reload the same feeds every 5 secs adding to the number infinitely, At the comment out update_period: 5000, makes the plugin work but I have no idea when it checks and updates. Could you help with this?