Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

This module is not working with botkit library for facebook chatbot #2

Closed
Abgaryan opened this issue Dec 6, 2017 · 11 comments
Closed

Comments

@Abgaryan
Copy link

Abgaryan commented Dec 6, 2017

This is the code i used

var apiai = require('botkit-middleware-dialogflow')({
    token:process.env.API_AI_ACCESS_TOKEN,
    skip_bot: true // false. If true, the middleware doesn't send the bot reply/says to Dialogflow
})
controller.middleware.receive.use(apiai.receive);
controller.hears(['hello'],'message_received',apiai.hears,function(bot, message) {
    console.log("api .ai detected entities", message.entities);
      });
@Abgaryan Abgaryan changed the title this module is not working with botkit library facebook chatbot This module is not working with botkit library facebook chatbot Dec 6, 2017
@Abgaryan Abgaryan changed the title This module is not working with botkit library facebook chatbot This module is not working with botkit library for facebook chatbot Dec 6, 2017
@Naktibalda
Copy link

@Abgaryan "not working" is not a useful issue description.
Please tell us more about what it is actually doing.
Do you get any errors?

@Abgaryan
Copy link
Author

Abgaryan commented Dec 7, 2017

There is no any error output ,it is not triggering actions from api ai , nothing is happening when i am typing keywords for actions .

@Naktibalda
Copy link

That's correct, because you have skip_bot: true above, what happens if you set skip_bot to false?

@Abgaryan
Copy link
Author

Abgaryan commented Dec 8, 2017

I already tried to set skip_bot: false still not working.

@robertkarlsson
Copy link

@Abgaryan Have you confirmed that your facebook app have a functioning webhook with your dialogflow agent?

@robertkarlsson
Copy link

Tested it out and it seems to be working fine together with dialogflow. I don't really understand what you mean by "facebook". There is a facebook integration in dialogflow, but botkit also has a facebook middleware. If you can explain the problem i might be able to help you.

@jschnurr
Copy link
Owner

Added a complete working example for Facebook as part of v1.1.0. @Abgaryan please review that and see if it resolves the problem.

@Abgaryan
Copy link
Author

@jschnurr Thank you i will take a look and will let you know.

@Abgaryan
Copy link
Author

Abgaryan commented Dec 13, 2017

@jschnurr
It doesn't work . I set dialogflow an agent with smalltalk.greetings.hello intent.
You can find the code below, Please tell me what is wrong?

const dialogflow = require('botkit-middleware-dialogflow')({
    token:process.env.DIALOGFLOW_ACCESS_TOKEN
   });

  controller.middleware.receive.use(dialogflow.receive);

  controller.hears(['smalltalk.greetings.hello'],'message_received',dialogflow.hears,function(bot, 
    message) {
       console.log("api .ai detected entities", message.entities);
  });

the bot is live and working well

@jschnurr
Copy link
Owner

Please run with debug and paste the result.

DEBUG=dialogflow-middleware node your_awesome_bot.js

@Abgaryan
Copy link
Author

@jschnurr you can close the issue now is working the issue was module version I updated it from 1.0.1 to 1.1.0
@jschnurr Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants