Simple API to receive webhooks (real-time updates) sent by social websites e.g. Facebook using PHP.
composer require sohaibilyas/catch-webhooks
use SohaibIlyas\CatchWebhooks\FacebookWebhook;
require './vendor/autoload.php';
$facebookWebhook = new FacebookWebhook('fb-app-secret');
$facebookWebhook->get(function($type, $webhookArray) {
// type can be page or user
if ($type === 'page') {
print_r($webhookArray);
}
});