watson-developer-cloud / botkit-middleware

A middleware to connect Watson Conversation Service to different chat channels using Botkit
https://www.npmjs.com/package/botkit-middleware-watson
Apache License 2.0
207 stars 257 forks source link

Sample code for Watson and Facebook Integration #212

Open Kool-Koder opened 4 years ago

Kool-Koder commented 4 years ago

Hi I tried to no avail to find up-to-date documentation about integrating Facebook and Watson Assistant. Most links direct me here but it's only for Slack. Is there anywhere with such documentations? Thanks!

mitchmason commented 4 years ago

If you look at the base botkit repo you can see sample code for all of the things botkit can connect to. We've simply written a middleware that relies on the base botkit repo.

That being said, we have a built in, hosted, connector to facebook in the integrations tab of the Watson Assistant product.

Kool-Koder commented 4 years ago

The botkit documentation links to this Github page for IBM middleware. I'm still trying to integrate with it but I'm having some trouble with the packages now. These seems to be 2 packages Link 1 and Link 2 and I'm still trying both and am not sure which to use.

With regards to the Facebook Integrations with Watson, there is no native support for Facebook Handoff Protocol. This means that in usage, when I attempt to hand off to a live agent in Facebook inbox and start chatting through there, to the end user it seems like the handoff is already completed but every single message you type still gets routed to the bot even while the human is replying which is absurd and hence I'm trying to build a middleware to get around this issue.

Hope you can advice more on this. Thanks!

mitchmason commented 4 years ago

The second link is just the standard ibm-watson SDK, not related to botkit. Bokit likely pulls it in I can't remember exactly, but you probably want to focus on the first link. Its been a long time since I've looked into this, and botkit has since been acquired by microsoft and updated a lot of their repo, but I think it should be this:

  1. Start with base botkit repo
  2. Pull in Watson Assistant middleware, which can be seen in the botkit core readme
  3. Pull in the botkit Facebook adapter https://github.com/howdyai/botkit/tree/master/packages/botbuilder-adapter-facebook
Naktibalda commented 4 years ago

The second link is just the standard ibm-watson SDK, not related to botkit. Botkit likely pulls it in I can't remember exactly, but you probably want to focus on the first link.

It doesn't, the only way Botkit relates to ibm-watson is through this middleware.