telegram-bot-sdk icon indicating copy to clipboard operation
telegram-bot-sdk copied to clipboard

unable to get callback data from full keyboard

Open alainbelez opened this issue 4 years ago • 1 comments

    public function handle()
    {
        $this->replyWithChatAction(['action' => Actions::TYPING]);

        $update = $this->getUpdate()->getMessage();
        $response = "Test Message";
        $keyboard = Keyboard::make()
        ->row(
            Keyboard::button(['text' => 'Help', 'callback_data' => '/start 1']),
            Keyboard::button(['text' => 'Button 2', 'callback_data' => 'your_callback_data'])
        )->setOneTimeKeyboard(true);

        $this->replyWithMessage(['text' => $response, 'parse_mode' => 'markdown', 'reply_markup' => $keyboard]);
    }

when i click the Help button, i dont receive any callback_data, i only receive Help from my webhook. how to i get callback data?

alainbelez avatar Dec 28 '20 17:12 alainbelez

do u understand how it work?

koriss avatar Mar 31 '22 19:03 koriss