PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Popa   PHP Facebook Page Parser   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Facebook Page Parser
Get Facebook page likes, comments, other details
Author: By
Last change:
Date: 10 years ago
Size: 427 bytes
 

Contents

Class file image Download
<?php
include ("classes/facebook.class.php");

$page_id = "162896513752848";

$facebook = new facebook();

$int = filter_var($page_id, FILTER_SANITIZE_NUMBER_INT);

$data = $facebook -> parse($int);

foreach (
$data as $entry) {
   
    echo
"<h2>{$entry->title}</h2>";
   
$published = date("g:i A F j, Y", strtotime($entry -> published));
    echo
"<small>{$published}</small>";
    echo
"<p>{$entry->content}</p>";
    echo
"<hr />";
}



?>