We have created a ChatBot with PHP and we want to connect Facebook messenger with that. This means the Facebook messenger should be act like our Bot. Please guide or refer to how to do that?
1 Answers
you can use a platform like DialogFlow which allows you to define the conversation and to publish on different channels (in your case Messenger). You can then configure a WebHook where DialogFlow pushes what the user says/responds.
Your webhook can be in any language as DialogFlow requires only an HTTP URL.
https://cloud.google.com/solutions/building-and-deploying-chatbot-dialogflow
There other platforms (Chatfuel for example) that make this even easier (if you only want to deploy on Messenger), and you can still use the webhook approach to link your backend.
Alternatively you can build the Chatbot specifically for Messenger, creating a Facebook app and a Facebook Page, again linking to your webhook.
https://developers.facebook.com/docs/messenger-platform/getting-started
No matter what you choose you will need to integrate with a platform or channel, which means your BOT needs to be able to talk the same 'JSON' or use some compatible APIs.

- 11,256
- 2
- 19
- 41