PHP code example of piedweb / facebook-scraper

1. Go to this page and download the library: Download piedweb/facebook-scraper 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/ */

    

piedweb / facebook-scraper example snippets


use PiedWeb\FacebookScraper\FacebookScraper;

$fbScraper = new FacebookScraper('myPageId');

$fbScraper->getPosts();

/** @Return array with subarray containing
 * publish_time
 * post_id
 * text
 * comment_number
 * like_number
 * images array
 */