2016-07-29 62 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