PHP code example of kerigansolutions / fb-autoblog-wp
1. Go to this page and download the library: Download kerigansolutions/fb-autoblog-wp 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 / fb-autoblog-wp example snippets
use KeriganSolutions\FacebookFeed;
use KeriganSolutions\FacebookFeed\WP\FacebookPost;
class Facebook extends FacebookFeed\WP\Admin
{
public $postsEnabled = true;
public $eventsEnabled = false;
public $photosEnabled = false;
public $reviewsEnabled = false;
// retrieve posts from WP database
public function getFbPosts($num = -1, $args = [])
{
return (new FacebookPost())->query($num, $args);
}
}
use KeriganSolutions\FacebookFeed\WP\FacebookPost;
$feed = new Facebook;
$results = $feed->query(5);