Search code examples
javascripthtmlinstagraminstagram-api

Instagram API Displaying Too Many Images


I have a problem with Instagram API. I only want to display the last image uploaded to my account but now it is displaying all of them:

<div class="col-xs-12 col-sm-6 col-md-4">
    <div class='square'>
        <div id="slideshow" class='white instagram' style="margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0;"></div>
            <h5>Instagram</h5>
            <h4>does</h4></br/>
                <div class="bottom"><i class="fa fa-instagram fa-2x"></i></div>
                <div class='bottom_right'>
                    Wed 18 Oct 2015
               </div>
       </div>
   </div>
</div>

<script type="text/javascript">
        $(document).ready(function() {
            $('#slideshow').embedagram({
                    instagram_id: xxxxxxxxx,
                    thumb_width: 360,
                    wrap_tag: 'div'
                });
        });
</script>

Solution

  • There is a limit parameter for embedagram. By default it is 20.

    $('#slideshow').embedagram({
                        instagram_id: xxxxxxxxx,
                        thumb_width: 360,
                        wrap_tag: 'div',
                        limit: 5
                    });
            });