sohaibilyas/catch-webhooks

一个简单的API,用于接收社交媒体(如Facebook)发送的webhooks(实时更新),使用PHP。

v1.0.0 2019-07-26 22:40 UTC

This package is auto-updated.

Last update: 2024-09-27 10:25:15 UTC


README

一个简单的API,用于接收社交媒体(如Facebook)发送的webhooks(实时更新),使用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);
    }
});