$reply = $name . "\n" . $price . " افغانی " . "\n\n";
$reply .= "/booking" . $id . " ? " . "خرید" . "\n" ;
$reply .= "/delete" . $id . " ? " . "حذف" . "\n\n";
$url = $GLOBALS['bot_url'] . "/sendPhoto";
$post_params = [
'chat_id' => $GLOBALS['chat_id'],
'photo' => new CURLFile(realpath($image_url)),
'caption' => $reply
];
send_reply($url, $post_params);
}
$connection->close();
//---------------------
$inline_keyboard = [
[
['text' => "ثبت محصول جدید", 'callback_data' => "add_new_product"]
]
];
$inline_kb_options = [
'inline_keyboard' => $inline_keyboard
];
$json_kb = json_encode($inline_kb_options);
$reply = "?جهت افزودن محصول جدید دکمه زیر را لمس کنید?";
$url = $GLOBALS['bot_url'] . "/sendMessage";
$post_params = ['chat_id' => $GLOBALS['chat_id'], 'text' => $reply, 'reply_markup' => $json_kb];
send_reply($url, $post_params);
}
我想在这里'callback_data' => "add_new_product"
中使用$reply .= "/booking" . $id . " ? " . "خرید" . "\n";
如何使用?请帮助我