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: 128 All time: 9,386 This week: 129Up
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  
Name: Nahid Bin Azhar <contact>
Classes: 24 packages by
Country: United States United States
Age: 33
All time rank: 792109 in United States United States
Week rank: 44 Up6 in United States United States Up
Innovation award
Innovation award
Nominee: 6x

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

  Files folder image Files (26)  /  app  
File Role Description
Files folder imageActions (1 file)
  Accessible without login Plain text file replies.php Example Example script

  Files folder image Files (26)  /  app  /  Actions  
File Role Description
  Plain text file Action.php Class Class source

  Files folder image Files (26)  /  libraries  
File Role Description
Files folder imageDb (2 files)
Files folder imageEnv (1 file)
Files folder imagehelpers (1 file)
Files folder imageHttp (2 files)
Files folder imageMessengers (3 files, 1 directory)
Files folder imageReplier (1 file)
  Plain text file FacebotServiceProvider.php Class Class source
  Accessible without login Plain text file mime.php Aux. Auxiliary script

  Files folder image Files (26)  /  libraries  /  Db  
File Role Description
  Plain text file Redis.php Class Class source
  Plain text file Storage.php Class Class source

  Files folder image Files (26)  /  libraries  /  Env  
File Role Description
  Plain text file EnvManager.php Class Class source

  Files folder image Files (26)  /  libraries  /  helpers  
File Role Description
  Accessible without login Plain text file env.php Aux. Auxiliary script

  Files folder image Files (26)  /  libraries  /  Http  
File Role Description
  Plain text file Request.php Class Class source
  Plain text file Response.php Class Class source

  Files folder image Files (26)  /  libraries  /  Messengers  
File Role Description
Files folder imageTemplates (6 files)
  Plain text file ApiClient.php Class Class source
  Plain text file Message.php Class Class source
  Plain text file ShareButton.php Class Class source

  Files folder image Files (26)  /  libraries  /  Messengers  /  Templates  
File Role Description
  Plain text file BaseTemplate.php Class Class source
  Plain text file Buttonable.php Class Class source
  Plain text file Buttons.php Class Class source
  Plain text file ButtonTemplate.php Class Class source
  Plain text file GenericTemplate.php Class Class source
  Plain text file ListTemplate.php Class Class source

  Files folder image Files (26)  /  libraries  /  Replier  
File Role Description
  Plain text file Replies.php Class Class source

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:128
This week:0
All time:9,386
This week:129Up