【问题标题】:Instagram API Displaying Too Many ImagesInstagram API 显示太多图像
【发布时间】:2015-11-02 12:46:24
【问题描述】:

我在使用 Instagram API 时遇到问题。我只想显示上传到我的帐户的最后一张图片,但现在它正在显示所有图片:

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

【问题讨论】:

    标签: javascript html instagram instagram-api


    【解决方案1】:

    embedagram 有一个 limit 参数。默认为 20。

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

    【讨论】:

    • 我不希望它为“限制:1”吗?
    • 这取决于你。我只是举了一个例子。希望对您有所帮助。
    • 不是真的,我正在关注一个设计!但是 1 似乎可以工作,所以谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多