<?php /** * Public Facebook Status Feed * http://vodex.net/public-facebook-feed/ * http://code.google.com/p/publicfacebookfeed/ */ require_once 'includes.php'; require_once 'rss.class.php'; $feedObj = new PublicFacebookFeed($appapikey, $appsecret, $adoConnectString); $feedObj->getUserID(); $items = $feedObj->getItems(); //$feedObj->dump($items); /** * Truncate titles over this length in chars */ $titleTruncateLength = 100; //fallback if (!is_array($items)) { $items = array(array('created_time' => time(), 'url' => '', 'name' => 'No content found; possible error.', 'message' => 'No content found; possible error.')); } //bah, hosting... $rssItems = array(); foreach ($items as $item) { $items['message'] = iconv('UTF-8', 'ASCII//TRANSLIT', $items['message']); $items['headline'] = iconv('UTF-8', 'ASCII//TRANSLIT', $items['headline']); $rssItem = array(); $date = $status['created_time']; $rssItem['dateShort'] = date('l, jS F Y', $date); $rssItem['dateLong'] = date('r', $date); $rssItem['url'] = htmlentities($item['permalink']);
<?php /** * Public Facebook Status Feed * http://vodex.net/public-facebook-feed/ * http://code.google.com/p/publicfacebookfeed/ */ require_once 'includes.php'; $feedObj = new PublicFacebookFeed($appapikey, $appsecret, $adoConnectString); $feedObj->getUserID(); $items = $feedObj->getItems(); $feedObj->dump($items);
<?php /** * Public Facebook Status Feed * http://vodex.net/public-facebook-feed/ * http://code.google.com/p/publicfacebookfeed/ */ require_once 'includes.php'; $feedObj = new PublicFacebookFeed($appapikey, $appsecret, $adoConnectString); //Using extended permissions, get from the stream a user's activity marked as public only //This just authorizes numerous permissions. It's a seperate URL to keep any future index.php functionality seperate //the intent is that a feed can then get data without the wallbanging of being forced to go via by the FB site itself //http://wiki.developers.facebook.com/index.php/Extended_permissions //TODO: use http://www.facebook.com/authorize.php?api_key=YOUR_API_KEY&v=1.0&ext_perm=offline_access in the link $feedObj->setLocalSessionKey();