dev-master
9999999-dev
MIT
The Requires
by Daron Adkins
0.22
0.22.0.0
MIT
The Requires
by Daron Adkins
0.19
0.19.0.0
MIT
The Requires
by Daron Adkins
Wallogit.com
2017 © Pedro Peláez
Easily pull posts and events into your WordPress Site from a Facebook page that you manage. Previous versions of this package retrieved posts in real time. Since 2.0, WorDPress is required and a spcial Admin page in WordPress is created. Posts and Events are fetched and added to the WP database using a cron that runs every hour., (*1)
Currently the app is configured to work with Posts and Events. Reviews and Albums are in progress., (*2)
composer require kerigansolutions/fb-autoblog-wp, (*3)
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);
fetch("/wp-json/kerigansolutions/v1/get-kma-fb-post", {
method: 'GET',
mode: 'cors',
cache: 'no-cache',
headers: {
'Content-Type': 'application/json',
},
})
.then(r => r.json())
.then((res) => {
// do something with res
})
MIT
MIT
MIT