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
963 stars 304 forks source link

Suggestion for a next release : add a carousel for displaying the posts #152

Open massonth opened 8 years ago

massonth commented 8 years ago

If this was already done by someone, I would appreciate sharing the experience because I tried but my weak programmer skill does not allow me to get it work. Thanks

Gasp23 commented 8 years ago

i agree!

Gasp23 commented 8 years ago

i did it! Use http://bxslider.com/ on the call back function() $(document).ready(function () { var updateFeed = function () {

            $('.social-feed-container').socialfeed({
                // FACEBOOK
                facebook: {
                    accounts: ['@facebook'],
                    limit: 5,
                    access_token: ??????????
                },
                // 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 () {
                    $('.social-feed-container').bxSlider({
                        slideWidth: 500,
                        minSlides: 2,
                        maxSlides: 2,
                        slideMargin: 10,
                        speed: 1000,
                        infiniteLoop: true,
                        auto:true
                    });
                    console.log('all posts are collected');
                }
            });
        };
        updateFeed();

    });
</script>
rabbitkun commented 8 years ago

I used idangerous' swiper :) works pretty well :)

MaluNoPeleke commented 8 years ago

@rabbitkun I cannot make it to work, what is missing? http://peleke.diphda.uberspace.de/bower_components/social-feed/ Thanks

rabbitkun commented 8 years ago

@MaluNoPeleke you have to call swiper on social-feed callback :)

callback: function() {
   console.log('all posts are collected');
        var swiper = new Swiper('.swiper-container', {
                        pagination: '.swiper-pagination',
                        paginationClickable: true
                    });
                }

or create a function that initializes swiper then call it on callback :)

MaluNoPeleke commented 8 years ago

As you can see I have done that but it doesn't work horizontally, only vertically: http://peleke.diphda.uberspace.de/bower_components/social-feed/ How to solve that?

HartLarsson commented 8 years ago

@MaluNoPeleke , other users still suggest to use another plugin while you still using owlCarousel that probably is not fully compatible or need different approach