Ifaour:
Well, here is the PHP that works as the follows:
-Retrieve Posts of any fb page id -> OK
-Retrieve my own Posts only in localhost mode -> OK
-Retrieve my own Posts via my website online -> NO
//function to retrieve posts wall
function loadFB($idpage)
{
$fbID=$idpage;
$graph="http://graph.facebook.com/".$idpage."/posts?limit=5";
$c = curl_init($graph);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$page = json_decode(curl_exec($c));
curl_close($c);
return $page->data;
}
$fbid='260323319978';
$fbCount=0;
$myPosts=loadFB($fbid);
date_default_timezone_set("America/Buenos Aires");
foreach($myPosts as $dPost)
{
if($dPost->from->id==$fbid)
{
$dTime = strtotime($dPost->created_time);
$myTime=date("d M Y h:ia",$dTime);
echo $mensaje=$dPost->message;
echo $fotolink=$dPost->link;
echo $foto=$dPost->picture;
echo $post_likes=$dPost->likes->count;
$permalink=$dPost->id;
$permalink=split('_',$permalink);
echo $perma=$permalink[1];
$fbCount++;
if($fbCount >= $fbLimit) break;
}
}
?>
AND here is the Javascript JSON that works as the follows:
-Retrieve Posts of any fb page id -> OK
-Retrieve my own Posts only in localhost mode -> OK
-Retrieve my own Posts via my website online -> OK
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
function fbFetch(){
var url = "http://graph.facebook.com/260323319978/posts?filter=1&limit=5";
$.getJSON(url,function(json)
{
var html = "<ul>";
$.each(json.data,function(i,fb)
{
var fecha=fb.created_time.split("T");
var trozos=fecha[0].split("-");
var mes;
switch(trozos[1])
{
case '01':
mes='Enero'
break;
case '02':
mes='Febrero'
break;
case '03':
mes='Marzo'
break;
case '04':
mes='Abril'
break;
case '05':
mes='Mayo'
break;
case '06':
mes='Junio'
break;
case '07':
mes='Julio'
break;
case '08':
mes='Agosto'
break;
case '09':
mes='Setiembre'
break;
case '10':
mes='Octubre'
break;
case '11':
mes='Noviembre'
break;
case '12':
mes='Diciembre'
break;
}
var permalink=fb.id;
var permalink=permalink.split("_");
var perma=permalink[1];
var pic=""+fb.picture+"";
html += "<li id='li'><div style='font-size:11px; color:#af1e1b; margin-bottom:4px;'>"+ trozos[2] +" de "+ mes +" del "+ trozos[0] + "</div><div style='color:#72697e;'>" + fb.message + "</div><br>"+ img +"</li>";
});
pic="";
perma="";
html += "</ul>";
$('.facebookfeed').animate({opacity:0}, 500, function(){
$('.facebookfeed').html(html);
});
$('.facebookfeed').animate({opacity:1}, 500);
});
};
</script>
<body onLoad="fbFetch()">
<div class="facebookfeed">
</div>