PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Nahid Bin Azhar   Talk to PHP Facebook Chat Bot   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Talk to PHP Facebook Chat Bot
Listen and reply to Messenger chat messages
Author: By
Last change:
Date: 5 years ago
Size: 430 bytes
 

Contents

Class file image Download
<?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);