2012-11-26 41 views
0

我是一個在html,facebook圖表api,jquery的新手。在html網站上的facebook頁面的顯示圖庫

我有以下代碼來獲取所有在Facebook粉絲頁面(而不是一個普通的配置文件)的相冊,以簡單的格式顯示它,我沒有看到鉻的開發人員控制檯中的任何錯誤,但照片是沒有被顯示。關於如何查看Facebook粉絲頁面中的所有圖片的任何想法?

<!DOCTYPE html> 
<html> 
<head> 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/ 
    1.4.2/jquery.min.js"></script> 
</head> 
    <body onLoad="fbFetch()"> 


    <script> 
    function fbFetch(){ 

     var url = "https://graph.facebook.com/160407767374259/photos?limit=5?callback="; 


     $.getJSON(url,function(json){ 
      var html = "<ul>"; 


     $.each(json.data,function(i,fb){ 
      html += "<li><img alt='"+ fb.from.name +"' height='" + fb.height + "' width='" + 
    fb.width + "' src='" + fb.picture + "'/></li><div style='clear:both;'>&nbsp;</div>"; 
}); 

html += "</ul>"; 


$('.facebookfeed').animate({opacity:0}, 500, function(){ 
$('.facebookfeed').html(html); 
}); 
$('.facebookfeed').animate({opacity:1}, 500); 
}); 
}; 

回答

相關問題