2016-05-26 157 views
0

我試圖獲得一個基本的飼料來顯示內容使用:socialfeed.js但沒有任何顯示,我沒有得到任何錯誤。socialfeed.js沒有顯示,但沒有錯誤

繼承人的全碼:

<!doctype html> 
<html> 

<head> 
    <meta charset="utf-8" /> 

    <!-- Social-feed css --> 
    <link href="css/jquery.socialfeed.css" rel="stylesheet" type="text/css"> 
    <!-- font-awesome for social network icons --> 
    <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> 
</head> 

<body> 

    <div class="social-feed-container"></div> 






    <!-- jQuery --> 
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> 
    <!-- Codebird.js - required for TWITTER --> 
    <script src="bower_components/codebird-js/codebird.js"></script> 
    <!-- doT.js for rendering templates --> 
    <script src="bower_components/doT/doT.min.js"></script> 
    <!-- Moment.js for showing "time ago" and/or "date"--> 
    <script src="bower_components/moment/min/moment.min.js"></script> 
    <!-- Moment Locale to format the date to your language (eg. italian lang)--> 
    <script src="bower_components/moment/locale/it.js"></script> 
    <!-- Social-feed js --> 
    <script src="js/jquery.socialfeed.js"></script> 

    <script> 
     $(document).ready(function(){ 

      $('.social-feed-container').socialfeed({ 
       twitter:{ 
       accounts: ['@jquery'],      //Array: Specify a list of accounts from which to pull tweets 
       limit: 2,         //Integer: max number of tweets to load 
       consumer_key: 'qzRXgkI7enflNJH1lWFvujT2P',   //String: consumer key. make sure to have your app read-only 
       consumer_secret: '8e7E7gHuTwyDHw9lGQFO73FcUwz9YozT37lEvZulMq8FXaPl8O',//String: consumer secret key. make sure to have your app read-only 
      }, 

      // GENERAL SETTINGS 
       length:400, 
       show_media: true,          //Integer: For posts with text longer than this length, show an ellipsis. 
      }); 
     }); 
    </script> 

</body> 

</html> 

任何想法,爲什麼?

回答

1

爲了使它工作,我做了以下內容:

1)運行在控制檯:

git clone https://github.com/pavelk2/social-feed/ 
nano index1.html 

2)輸入您的例子(沒有進行任何更改)代碼

3)運行網絡服務器 4)通過網絡服務器導航到/index1.html(在我的案例http://localhost/Open-source/TroubleShootingSF/social-feed/index1.html),我們看到以下內容:The screenshot of Social-Feed working

相關問題