public function parse()
{
parent::parse();
$rss = new \Pop\Feed\Format\Rss\Facebook(array('url' => 'http://www.facebook.com/feeds/page.php?id=' . $this->id . '&format=rss20'), $this->limit);
$this->feed->username = substr($this->feed->url, strpos($this->feed->url, '.com/') + 5);
$this->feed->title = (string) $rss->obj()->channel->title;
$this->feed->date = (string) $rss->obj()->channel->lastBuildDate;
$this->feed->generator = (string) $rss->obj()->channel->generator;
$this->feed->author = substr($this->feed->title, 0, strpos($this->feed->title, "'s"));
$i = 0;
foreach ($rss->obj()->channel->item as $item) {
if (isset($this->feed->items[$i])) {
$title = trim((string) $item->title);
if ($title == '') {
$title = (string) $item->link;
}
$this->feed->items[$i]->title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
$this->feed->items[$i]->content = html_entity_decode((string) $item->description, ENT_QUOTES, 'UTF-8');
$this->feed->items[$i]->link = (string) $item->link;
$this->feed->items[$i]->published = (string) $item->pubDate;
$this->feed->items[$i]->time = self::calculateTime((string) $item->pubDate);
}
$i++;
}
}