Hello. Learning to do chat bots. Question: Why is the Callback not transmitted when the inline button is clicked? What am I doing wrong?
$chat_id = $result["message"]["chat"]["id"]; $keyboard = Keyboard::make() ->inline() ->row( Keyboard::inlineButton(['text' => 'Show menu', 'callback_data' => 'show_menu']), Keyboard::inlineButton(['text' => 'Request price', 'callback_data' => 'requiest.price']) ); $response = $telegram->sendMessage([ 'chat_id' => $chat_id, 'text' => 'Hello', 'reply_markup' => $keyboard ]); $result = $telegram->getWebhookUpdate(); if ($result->isType('callback_query')) { $query = $result->getCallbackQuery(); $data = $query->getData(); $chid = $query->getFrom()->getId(); $json = json_decode($query->getMessage(), true); $telegram->sendMessage([ 'chat_id' => $chid, 'text' => 'Here is callback', 'reply_markup' => $keyboard ]); } else { $telegram->sendMessage([ 'chat_id' => $chat_id, 'text' => 'Callback is not found here']); }