I am trying to extract data from Facebook pages, till now I have managed to gather data from the pages in a JSON format, however I want these to be displayed in a presentable manner. Would anyone provide me with any techniques or what my next step should be?
My current code is as follows:
$pageIdPosition = strripos($_POST["URL"], '/');
$pageIdStop = strripos($_POST["URL"], '?');
$pageId = substr($_POST["URL"], $pageIdPosition +1);
echo $pageId;
echo "<br />\n";
echo "<br />\n";
// create a new cURL resource
$url = "http://graph.facebook.com/" . $pageId . "posts";
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// grab URL and pass it to the browser
curl_exec($ch);
$res = curl_exec($ch);
var_dump($res);
// close cURL resource, and free up system resources
curl_close($ch);