项目作者: sleeyax

项目描述 :
Facebook messenger bot framework
高级语言: PHP
项目地址: git://github.com/sleeyax/FamePHP.git
创建时间: 2018-03-18T13:08:54Z
项目社区:https://github.com/sleeyax/FamePHP

开源协议:MIT License

下载


FamePHP

FamePHP is a framework for creating Facebook messenger bots. It uses the official Facebook API and requires PHP 7.2 or higher.

Documentation

For a quick setup guide and some examples, head over to the wiki.

Quickstart

Can’t wait to try it out? Edit api/Config.php to your requirements and use this code snippet in index.php

  1. <?php
  2. require_once 'core/Bootstrap.php';
  3. use Famephp\core\Response;
  4. use Famephp\core\Sender;
  5. use Famephp\core\attachments\Text;
  6. $listener->hears('hi', function(Sender $sender, Response $response) {
  7. $response->send(new Text("Hello, $sender->firstname! :D"));
  8. });

quickstart result image