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

后端 未结 3 1314
谎友^
谎友^ 2021-02-03 13:37

In Facebook\'s documentation they refer to wit.ai Bot Engine, but I can\'t find anywhere online where its explained how to connect the Story that you build in Wit with your Face

3条回答
  •  故里飘歌
    2021-02-03 13:55

    Wit.ai needs an input - user input. Sentence, phrase, word - to give you back the analysed results.

    So first when you say "your Facebook Messenger app" - you need to make sure you are handling the messenger part by itself: have a code in your language of preference running on the server\your laptop which can receive the text which is sent to the messenger account on Facebook.

    When you get that working, you will have to use one of Wit.ai libraries for the code language you are using to pass that phrase you receive from the user chatting through the messenger to Wit.ai "library" which will communicate it "to the wit.ai stories" you have and get the result from them.

    For example for Python:

    • Library to handle FB Messenger chatting
    • Wit.ai library to pass the user input "to stories and get result"

提交回复
热议问题