How does Facebook Messenger connect to Wit.ai Bot Engine?

In the Facebook documentation, they refer to wit.ai Bot Engine, but I can not find anywhere on the Internet that explains how to link the story you create in Wit using the Facebook Messenger app?

+7
bots facebook-messenger
source share
2 answers

Wit.ai needs input - user input. Sentence, phrase, word - to return the results of the analysis.

So, first, when you say "your Facebook Messenger application" - you need to make sure that you yourself process the messenger part: use the code in your preferred language on the server \ your laptop, which can receive text that is sent to your Facebook account.

When you get this work, you will have to use one of the Wit.ai libraries for the code language that you use to convey the phrase that you get from the user while chatting with the Wit.ai library that will report this to the stories wit.ai "that you have and get results from them.

For example, for Python:

+11
source share

You can integrate Wit into any message API. For example, using the send / receive message API, you can receive and receive messages from Messenger users. Wit.ai can then analyze the messages and predict the next response.

Here is an example in Node js: https://github.com/wit-ai/node-wit/blob/master/examples/messenger.js

+4
source share

All Articles