paranoiq/messenger

PHP Library to interact with Facebook Messenger Platform (fork of kerox/messenger)

v3.9.0 2019-08-21 12:02 UTC

This package is auto-updated.

Last update: 2024-12-22 19:59:50 UTC


README

A PHP library to interact with Facebook Messenger Platform

This is a fork of https://github.com/ker0x/messenger with some, but not yet all changes from Messenger API v4.0

Installation

You can install Messenger using Composer:

composer require kerox/messenger

You will then need to:

  • run composer install to get these dependencies added to your vendor directory
  • add the autoloader to your application with this line: require('vendor/autoload.php');

Basic usage

use Kerox\Messenger\Messenger;

$messenger = new Messenger($appSecret, $verifyToken, $pageToken)
$messenger->send()->message(<USER_ID>, 'Hello world!');

Advance usage

Please, refer to the wiki to learn how to use this library

Features

API

  • Broadcast
  • Code
  • Insights
  • Nlp
  • Persona
  • Profile
  • Send
  • Tag
  • Thread
  • User
  • Webhook

Templates

  • Airline Boarding Pass
  • Airline Check In
  • Airline Itinerary
  • Airline Update
  • Buttons
    • Account Link
    • Account Unlink
    • Nested
    • Payment
    • Phone Number
    • Postback
    • Share
    • Web Url
  • Generic
  • List
  • Media
  • Receipt

Callback

  • Account Linking
  • AppRoles
  • Checkout Update
  • Delivery
  • GamePlay
  • Message
  • Message Echo
  • Optin
  • PassThreadControl
  • Payment
  • Policy Enforcement
  • Postback
  • Pre Checkout
  • Read
  • Referral
  • RequestThreadControl
  • TakeThreadControl