0

I'm using Botman 2.0 and Codeigniter 3.1.6

Ngrok & FB Webhook setup successfully..

Did a simple hears & reply method, working good :

$this->botman->hears('foo','HelloWorld@handleFoo');
$this->botman->hears('hello',function($bot){
    $bot->reply('bye~');
 });

enter image description here

But when using Botman's conversation method, then Bot is not replying...my conversation code as below:

$this->load->library('BotConversations/OnboardingConversation');
$this->botman->hears('sup', function($bot) {
    $bot->startConversation(OnboardingConversation);
});
// Listen
$this->botman->listen();

enter image description here

anyhow, I've follow Botman's Cache conf's guide to setup Cache via Codeigniter method

Below are some of my test files:

appreciate your help! thanks....

Rajeev Ranjan
  • 4,152
  • 3
  • 28
  • 41
Mavichow
  • 1,213
  • 17
  • 41
  • Hi @Mavichow, How did you setup the Botman and CodeIgniter, I am trying setup, but so far this does no work, Could you give some advices for find the solution? – wilfredonoyola Aug 01 '18 at 16:23
  • Hi @Mavichow, Is required setup Cache on Codeigniter to that the botman works correctly? – wilfredonoyola Aug 01 '18 at 18:13
  • Hello, it doesn't need any cache setup on Codeigniter, I follow the documentation @ https://botman.io/2.0/installation#installation via Composer Installation – Mavichow Aug 02 '18 at 02:48
  • I believe you need to setup the correct credential on your Driver/Provider, the provider I use is facebook and I'm referring to https://botman.io/2.0/driver-facebook-messenger – Mavichow Aug 02 '18 at 02:50
  • I've installed https://ngrok.com/ on my machine as well to tunnel HTTPS in local environment – Mavichow Aug 02 '18 at 02:51
  • Thanks for your reply, Currently I had complete setup on my own server(HTTPS) and this does no work. But I integrated another fan page of test and the bot app of test with NodeJS and they work very good. I am not sure to happen with Botman. And also, I followed the steps of the documentation in botman.io. – wilfredonoyola Aug 02 '18 at 15:54
  • A thing more, Is need to send request from postman app or nrok? or I could send from messenger. – wilfredonoyola Aug 02 '18 at 16:00
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/177298/discussion-between-wilfredonoyola-and-mavichow). – wilfredonoyola Aug 02 '18 at 18:34

1 Answers1

0

Everything works fine right now, I overlook on a simple syntax issue... updated my code as below :

$this->botman->hears('sup', function($bot) {
    $bot->startConversation(New OnboardingConversation);
});
Mavichow
  • 1,213
  • 17
  • 41