PHP Classes

Talk to PHP Facebook Chat Bot: Listen and reply to Messenger chat messages

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 129 All time: 9,378 This week: 51Up
Version License PHP version Categories
facebot 1.0.0MIT/X Consortium ...5PHP 5, Web services, Chat, Social Net...
Description 

Author

This package can listen and reply to Messenger chat messages.

It can register message sequence or templates to which the application should listen coming from users that interact using Facebook messenger.

Each message sequence or template is associated to a named action so functions of a class that the application provide are called to process the messages and execute Facebook chat bot response actions.

Picture of Nahid Bin Azhar
  Performance   Level  
Innovation award
Innovation award
Nominee: 7x

Winner: 2x

 

Example

<?php
require 'vendor/autoload.php';

use
Nahid\FaceBot\Replier\Replies;
use
Nahid\FaceBot\Http\Request;
use
Nahid\FaceBot\Env\EnvManager;

$env = new EnvManager(__DIR__);
$replier = new Replies();
$request = new Request();


if (
$token = $request->verifyToken()) {
    echo
$token;
    die();
}

$replier->register('App\Actions', function($replier) {
    require
__DIR__ . "/app/replies.php";
});

$replier->dispacth($request);


Details

FaceBot

FaceBot is a PHP Framework for Facebook Messenger Bot development.


  Files folder image Files (26)  
File Role Description
Files folder imageapp (1 file, 1 directory)
Files folder imagelibraries (2 files, 6 directories)
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file ngrok.yml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:129
This week:0
All time:9,378
This week:51Up