- Sign up FREE to SociableKIT.
- Create a Facebook page posts widget.
- On the upper right, click Options > Data feed.
- It will show you the data feed of your Facebook page posts in JSON format.
- Use the JSON data with PHP. The following is a sample code.
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl([JSON_DATA_FEED_URL]);
$request->setRequestMethod(\'GET\');
$client->enqueue($request)->send();
$response = $client->getResponse();
$response = $response->getBody();
// PHP artisan dev, do it like a pro :D
That’s it! Thank you for reading our tutorial about how to get Facebook page posts data using PHP.