2016-07-29 33 views
0

根据Instagram的API更新需求进行更新后,挣扎着Instafeed.js。Instagram API更新后Instafeed.js错误

我相信我已经获得了所有的用户信息和证书正常工作,但无法通过似乎与更改无关的错误。

原始功能的应用程序之前,Instagram的API更新:

http://integrantsightsandsounds.com

与目前Instagram的凭据更新页面生成错误 '的ReferenceError:找不到变量:instafeed'

<script type="text/javascript"> 
    (function ($) { 
     $(function() { //on DOM ready 
       var userFeed = new instafeed({ 
       target: 'instagram_list', 
      get: 'user', 
      userId: 1527608886, 
       clientID: 'cb4f0f8196b04aaeaa66e2b253d18b0e', 
      limit: 25, 
      resolution: 'thumbnail' 
          }); 
          userFeed.run(); 
          $("#instagram_list").simplyScroll({ 
       startOnLoad: true, 
       speed: 1, 
       frameRate: 20, 
       orientation: 'horizontal', 
       direction: 'forwards', 
      }); 
         }); 
        })(jQuery); 

尽我所知,(作为某人不知道我在做什么)变量没有从原始的功能标记中改变,并且不应该受更新的用户凭证影响。

测试页:

http://integrantsightsandsounds.com/instafeedtest/

@ladygargar

+0

测试页面需要到404页。 – yuriy636

+0

链接是固定的,我的不好。 – coot

回答

0

好像你有一个错字。该对象应该是Instafeed而不是instafeed(我是首都)。

0

instafeed.js可能在您的页面代码中缺失。

尝试增加:

<script src="//cdn.rawgit.com/stevenschobert/instafeed.js/master/instafeed.min.js"></script> 

与凭证和这样你的脚本之前。

注:此外,像@ 10100111001回答,你必须写new Instafeed与资本一

+0

感谢您的回复。 我确实在头文件中有脚本的链接。事实上,我甚至在试图完成这项工作的过程中更新了更新的版本,并注意到在instafeedjs.com的当前文档中,变量new Instafeed具有大写字母I,与之前用小写字母i。 在脚本中使用大写I变量引用Instafeed的情况下尝试了两种方法,但仍然出现相同的错误。 – coot

+0

你错误地加入了它,看看你的'http:// integrantsightsandsounds.com/instafeed/instafeed.js'文件。它的HTML。它应该是JS。看看你的浏览器控制台,有一个错误,告诉你'Uncaught SyntaxError:Unexpected token <',因为它需要JavaScript,而不是HTML。试试我的答案链接。 – yuriy636