Download the PHP package andre/bionic without Composer

On this page you can find all versions of the php package andre/bionic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bionic

Bionic

Bionic is a simple chat bot development library in PHP.

It is driven by a very simple but powerful event dispatching library Événement and Guzzle a PHP HTTP client that makes it easy to send HTTP requests

Platform support

Facebook Messenger and Instagram

What is covered

Installation

Create a FB page

First login to Facebook and create a Facebook page. Choose the settings that fits best your bot, but for testing it is not important.

Create a FB Messenger app

Go to the developer's app page. Click "Add a New App" and fill the basic app fields.

On the "Product Setup" page choose Messenger and click "Get Started".

Now you need to create a token to give your app access to your Facebook page. Select the created page, grant permissions and copy the generated token. You need that one later.

Create a webhook for the Facebook app for either Messenger or Instagram

Your application needs to have a webhook. This means a public URL that Facebook can communicate with. Every time a user sends a message inside the FB chat, FB will send it to this URL which is the entry point to your application.

Connect the Facebook app to your application

Now that you got the URL you need to setup the webhook. Go back to you Facebook app settings and click Setup Webhooks inside the Webhooks part.

Fill in the public URL, check the subscription fields you want to with and click Verify and Save.

Note: You need to write your own webhook verification logic in your application.

Setup Bionic

The recommended way to install Bionic is through composer.

Just create a composer.json file for your project and require it:

Now you can add the autoloader, and you will have access to the library:

Usage

Creating a Bionic instance

Registering event listeners

Syntax

With an anonymous function

With a defined function

With a class method

With a static class method

Usage with messenger and Instagram

Basic example

Available events provided for messenger and Instagram

Some events do not apply for Instagram, consult documentation

Supported Buttons

NOTE: Explore class files for a better understanding of provided methods

Sending Messages

Attachments

Supported Templates

Others

Messenger Profile

Handover Protocol

Usage with Telegram

Usage with Viber

Exception Handling

Any exceptions not caught when you are defining your event listeners logic are automatically captured. So remember to register a listener that listens for these exceptions.

Bugs

For any bugs found, please email me at [email protected] or register an issue at issues


All versions of bionic with dependencies

PHP Build Version
Package Version
Requires evenement/evenement Version ^3.0
guzzlehttp/guzzle Version ^7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andre/bionic contains the following files

Loading the files please wait ....