PHP code example of kerigansolutions / facebookfeed

1. Go to this page and download the library: Download kerigansolutions/facebookfeed library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kerigansolutions / facebookfeed example snippets



$facebookFeed  = new KeriganSolutions\FacebookFeed\FacebookFeed();
$numberOfPosts = 5;

$results = $facebookFeed->fetch($numberOfPosts);

echo '<pre>',print_r($results),'</pre>';


$facebookFeed  = new KeriganSolutions\FacebookFeed\FacebookFeed();
$numberOfPosts = 5;

$results = $facebookFeed->fetch($numberOfPosts);

$facebookFeed  = new KeriganSolutions\FacebookFeed\FacebookFeed();
$numberOfPosts = 5;
$before        = null;
$after         = 'Q2c4U1pXNTBYM0YxWlhKNVgzTjBiM0o1WDJs...';

$results = $facebookFeed->fetch($numberOfPosts, $before, $after);

echo '<pre>',print_r($results),'</pre>';


$fb     = new KeriganSolutions\FacebookFeed\FacebookEvents();
$before = null;
$after  = null;
$events = $fb->fetch(10, $before, $after);

echo '<pre>',print_r($events),'</pre>';