0

无论出于何种原因,Instafeed ( http://instafeedjs.com/ ) 都没有显示任何内容。如果这有所作为,我正在使用 localhost。

我的标记如下:

<div class="photo-container">
<div id="instafeed"></div>
</div>

我已经在 CSS 中设置了照片容器的高度。

这是我的 JS:

<script type="text/javascript">
        var userFeed = new Instafeed({
          clientId: '33a######################76569e',
          get: 'user',
          userId: 22####892,
          accessToken: '2######92.46######.108#######403e8088#####05',
          limit: 9,
          useHttp: true,
          target: 'instafeed',
          template: '<a href="{{link}}" target="_blank"><img src="{{image}}" /><div class="likes">&hearts; {{likes}}</div></a>'
          });
          userFeed.run();
    </script>

我在脚本上方还有以下行:

<script src="js/instafeed.min.js"></script>

我似乎无法在这里找到问题?奇怪的是它可以在 JSFiddle 中工作,但不能在 localhost 上工作。它只是有一个空白空间是照片容器所在的位置。我也把它上传到网上,它在那里也不起作用。

4

0 回答 0