function fb_parse_feed( $no) {
// You need to query the feed as a browser.
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');
// URL to the Facebook page's RSS feed.
$rss_url = "https://www.facebook.com/feeds/page.php?format=atom10&id=135405833136323";;
$xml = simplexml_load_file( $rss_url );
$out = '';
$i = 1;
foreach( $xml->entry as $item ){
//preg_match('||', $item, $resultat);
//print_r($item->link);
echo $item->published.'--'.$item->link['href'].'
';;
if( $i == $no ) break;
$i++;
}
echo $out;
}
fb_parse_feed( 5 );
//print_r($tab_post);
?>