GithubHelp home page GithubHelp logo

gomoob / php-facebook-messenger Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 1.0 350 KB

A PHP Library to easily work with the Facebook Messenger REST Web Services.

License: BSD 3-Clause "New" or "Revised" License

JavaScript 2.42% PHP 97.58%
facebook facebook-messenger facebook-messenger-bot facebook-messenger-platform php

php-facebook-messenger's Introduction

php-facebook-messenger

A PHP Library to easily send Facebook Messenger message with the REST Web Services.

Total Downloads Latest Stable Version Build Status Coverage Code Climate License

First sample, creating a Facebook Messenger text message

// Create a Facebook Messenger client
$client = Client::create()->setPageAccessToken('XXXX-XXX');

// Create a request to send a simple Text Message
$request = TextMessageRequest::create()
    ->setRecipient(Recipient::create()->setId('USER_ID'))
    ->setMessage(TextMessage::create()->setText('hello, world !'));

// Call the REST Web Service
$response = $client->sendMessage($textMessageRequest);

// Check if its ok
if($response->isOk()) {
    print 'Great, the message has been sent !';
} else {
    print 'Oups, the sent failed :-('; 
    print 'Status code : ' . $response->getStatusCode();
    print 'Status message : ' . $response->getStatusMessage();
}

Easy, isn't it ?

Documentation

In progress.

About Gomoob

At Gomoob we build high quality software with awesome Open Source frameworks everyday. Would you like to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible !

You can contact us by email at [email protected] or by phone number (+33) 6 85 12 81 26 or (+33) 6 28 35 04 49.

Visit also http://gomoob.github.io to discover more Open Source softwares we develop.

php-facebook-messenger's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

farmerstevieb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.