Sample code for Watson and Facebook Integration
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!
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.
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!
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:
- Start with base botkit repo
- Pull in Watson Assistant middleware, which can be seen in the botkit core readme
- Pull in the botkit Facebook adapter https://github.com/howdyai/botkit/tree/master/packages/botbuilder-adapter-facebook
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.