linuskohl/facebook-messenger-webhook

dev-master 2017-04-30 20:51 UTC

This package is not auto-updated.

Last update: 2024-04-23 23:43:24 UTC


README

Unofficial Facebook Messenger Webhook in PHP
Official documentation available here

Requirements

  • "netresearch/jsonmapper" : "~1.1.1"

Install

Via Composer

$ composer require linuskohl/facebook-messenger-webhook dev-master

License

The MIT License (MIT). Please see License File for more information.

Documentation

Class: linuskohl\facebookMessengerWebhook\Webhook

Visibility Function
public __construct(string $app_secret, string $validation_token) : void
Webhook constructor.
public handle(mixed $request_body) : void
Handle POST request
public handleVerification(mixed $parameters) : bool
Handle GET verification requests https://developers.facebook.com/docs/graph-api/webhooks#verification
public verifyRequestSignature(string $signature, string $body) : void
Verify that the callback came from Facebook https://developers.facebook.com/docs/graph-api/webhooks#setup