JSFiddle - React, Tailwind, and code Playground
by kougiland
HTML
<div class="facebookfeed"></div>
replace wwww with graph to get the page id
JavaScript
$(function(){
fbFetch();
function fbFetch(){
var albums = "https://graph.facebook.com/19292868552/albums";
var albumPictures = "https://graph.facebook.com/6564142497/photos?limit=500?callback=";
$.getJSON(albums,function(json){
var album = "<ul>",
html = "<div>";
$.each(json.data,function(i,fbalbum){
console.log(fbalbum);
html += "<li><div>cover Id:" + fbalbum.cover_photo + "</div><div>pictures IN:" + fbalbum.count + "</div><div>created_time:" + fbalbum.created_time + "</div><div>location:" + fbalbum.location + "</div><div>id:" + fbalbum.id + "</div><div>name:" + fbalbum.name + "</div><div>description:" + fbalbum.description + "</div><div><a href=" + fbalbum.link + ">link</a></div><img alt='"+ fbalbum.from.name +"' height='" + fbalbum.height + "' width='" + fbalbum.width + "' src='" + fbalbum.picture + "'/></li><div style='clear:both;'> </div>";
// html += "<li><img alt='"+ fb.from.name +"' height='" + fb.height + "' width='" +
// fb.width + "' src='" + fb.picture + "'/></li><div style='clear:both;'> </div>";
});
html += "</ul>";
$('.facebookfeed').animate({opacity:0}, 500, function(){
$(this).html(html).find('img').attr('src',function(i,e){return e.replace("s.jpg","o.jpg");});
});
$('.facebookfeed').animate({opacity:1}, 500);
});
};
});