Reputation: 53
So I'm trying to Pull a Facebook feed with works in all browsers but not IE.
It pulls the feed and outputs it to a in the main page.
Any suggestions?
$.getJSON("https://graph.facebook.com/"+user+"/feed&limit="+limit+"?"+token+"", function(data) {
for(emp in data.data) {
console.log(data.data[emp]);
// If adding CSS style the DIVS below can change the P tags
var newRow = "<div class=\"FB-post\">"+
// note using the fuzzyFacebookTime to convert JSON time tag to readable time.
"<p><a href='https://www.facebook.com/pages/123456789/123456789' target='_blank'><img src='/123456789/images/facebook_logo_20x20.jpg' style='padding-right:10px;' /></a><small><i>Posted "+fuzzyFacebookTime(data.data[emp].updated_time.replace(/-/g,'/'))+"</i></small></p>"+
"<p>"+data.data[emp].message+"</p>"+
"<p class=\"FB-more-link\"><a href='https://www.facebook.com/pages/123456789/123456789' target='_blank'>click here to read more</a></p>"+
"</div>";
$("#EmpNewTable").prepend(newRow);
}
});
});
});
Upvotes: 1
Views: 462
Reputation: 31033
console
is not defined in IE remove the line
console.log(data.data[emp]);
and you are good to go, or you can check before logging
if (typeof console != "undefined") {
console.log(data.data[emp]);
}
Upvotes: 3