Download the PHP package quangtam/messenger without Composer

On this page you can find all versions of the php package quangtam/messenger. 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 messenger

Scrutinizer Code Quality Code Coverage Build Status Total Downloads Latest Stable Version

Facebook Messenger

This repo contain some tools to work with facebook messenger bot and laravel/lumen. This repo work on beta of facebook messenger. Some big change are coming for sure but I guess that can help you.

Table of contents

  1. Installation
  2. Implement contract
  3. Change service provider
  4. Example of MessengerContract implementation
  5. Create application
  6. Host your application
  7. Facade
    1. sendTextMessage
    2. sendImageMessage
    3. getCurrentUserProfile
    4. sendCard
    5. persistMenu
  8. Example

Installation for Laravel

composer required distilleries/messenger

Add Service provider to bootstrap/app.php:

Installation for Lumen

composer required distilleries/messenger

Add Service provider to config/app.php:

And Facade (also in config/app.php) replace the laravel facade Mail

Implement contract

To easily implement the fonctionality for your application I created a Distilleries\Messenger\Contracts\MessengerReceiverContract.

Event Method Description
messaging_optins receivedAuthentication Subscribes to Authentication Callback via the Send-to-Messenger Plugin
message receivedMessage Subscribes to Message Received Callback
message_deliveries receivedDeliveryConfirmation Subscribes to Message Delivered Callback
messaging_postbacks receivedPostback Subscribes to Postback Received Callback
all other defaultHookUndefinedAction Call when the other methods was no called

Change service provider

To change the class use go to app/Providers/MessengerServiceProvider.php and change the class inside the share function.

Example of MessengerContract implementation

Create application

Follow the messenger documentation to create the app https://developers.facebook.com/docs/messenger-platform/quickstart.

After the application created and the page created and associated copy the .env.example to .env

Host your application

You have to host your application to become use it. Facebook can't send you a web hook in local. So make sure you have an hosting ready before start you development.

Your bot is in sandobox by default. Only the people with the permission in your application can talk with it.

Facade

sendTextMessage

Officiale documention

sendImageMessage

Officiale documention

getCurrentUserProfile

Officiale documention

sendCard

Officiale documention

Example

On this messenger class you can say hi and the bot give you an answer like this :

Hi First name Last name

Send a picture with a picto on the bottom right`

I customize your profile picture. Do you like it?


All versions of messenger with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
illuminate/support Version >=5.2.0
guzzlehttp/guzzle Version ^6.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 quangtam/messenger contains the following files

Loading the files please wait ....