Integration with Facebook messenger API. You will be able to chat with Facebook page users directly in lhc back office.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bootstrap
classes
design/fbmessengertheme
doc
modules
pos
settings
vendor
.gitignore
README.md
composer.json

README.md

Facebook messenger extension

Integration with Facebook messenger API. You will be able to chat with Facebook page users directly in lhc back office.

  • Support multiple pages without creating new app for each page. [New]
  • Supports multiple pages at once.
  • Each page chat can be assigned to custom department.

Installation in your LHC server

  • Upload the files to your /extension folder
  • Install database either by executing doc/install.sql file or executing this command php "cron.php -s site_admin -e fbmessenger -c cron/update_structure"
  • Activate extension in settings/settings.ini.php extension section "fbmessenger" by Adding lines: 'extensions' => array ( 'fbmessenger', ),
  • Now you can create facebook page in Modules -> Facebook chat -> Facebook pages -> Register new page (later you will have this info from facebook developer section) if you dont see this in Module, check your settings.ini.php
  • Once page is created you will see what callback url you have to put in facebook webhook. URL is presented in list. HTTPS is must!

Installation in Developers.Facebook.com

Enable pages_messaging

  • Your facebook application has to have "pages_messaging" permission for lhc to be able to extract visitor information and be able to send messages back to lhc. For that you will have to submit application and wait for FB to review it. See image There you have to enter the url that your LHC gives you for callback YOUR CALLBACK url

Then Submit to facebook to validate your app

Before facebook validates your application keep settings "verified" false (in your LHC facebook page configuration)

  • After facebook has reviewed your application set "verified" to YES. So you will be able to send a messages. During testing, if you add some developer, you can set it to true to see how it works.

Finally Make your app public.

  • After facebook has reviewed your application you need to make your app live and available See image

How it works

Once visitor writes a message in facebook page. You will receive a chat with visitor.

How to debug

in extension/fbmessenger/settings/settings.ini.php change setting to 'enable_debug' => true if you have verified site. Check cache/default.log for more detailed error.

Todo

  • Add support for images, not just plain messages.
  • Add support for automated hosting environment.
  • Get facebook user details like email or phone.