$.getJSON('https://graph.facebook.com/BogdanErimia/posts/?access_token=xxxxx&date_format=U&limit=17&callback=?', function(feed) {
$.each(feed.data, function(index, item){
$('.tweet').append('<div class="item-normal"><div class="normal"><div id="story2">' + item.message + '</div></div><div class="twitterbg"></div></div>');
if ( index == 10 ) return false;
});
});
There are some items in the feed without this “message”, and for them give me “undefined” error. I want to hide it please…
Check
if(item.message)before you append a row. You may want to use a counter now, to check when you hit the 10th row.