Posted on July 8, 2011 by Michael Rosario
Total Posts: 33 | Join date: 03-12-11
We needed to add facebook statuses to our site, and we had access to Facebook Pages’s RSS feed.
So here’s the steps:
Here is the code:
<? $list = “”; ?></p>
{exp:magpie url=”http://www.facebook.com/feeds/page.php?id={YOUR_ID_NUMBER}&format=rss20” limit=”11” refresh=”720”}
{items}
<?
$pubDate= “{pubdate}”; // Get the date
$title = “”.”“; // Get the title
$pubDate = strftime(“%m/%d”, strtotime($pubDate)); //Parse the date
?>
<?
if(strlen($title) != 1){ //check if title is empty
$list .= “</p>
<dl><dt><b>”. $pubDate.”</b> - “.$title.”</dt></dl>
<p>”;
};
?>
{/items}
{/exp:magpie}</p>
<p><? echo $list; ?> // Display Output
Tags: There are no tags for this entry.