0
我知道这是在电报机器人API网址为发送消息:如何在bot api电报中设置参数以回复标记键盘?
https://api.telegram.org/botTOKEN/sendMessage?chat_id=10101010&text=“这 是测试”
但如何设置parametr到URL中使用ReplymarkupKeyboard 我只需要URL没有通过代码 TNX
我知道这是在电报机器人API网址为发送消息:如何在bot api电报中设置参数以回复标记键盘?
https://api.telegram.org/botTOKEN/sendMessage?chat_id=10101010&text=“这 是测试”
但如何设置parametr到URL中使用ReplymarkupKeyboard 我只需要URL没有通过代码 TNX
如果找到答案由自己:
用于发送ReplyKeyboardMar KUP通过URL,我们应该用这样的方式:
https://api.telegram.org/botTOKEN/sendMessage?chat_id=10101010&text= “TEST” & reply_markup = { “键盘”:[ “A”, “B”]}
,并为寻找这个网址(或使用代码发送消息)在php代码是:
$replyMarkup = array(
'keyboard' => array(
array("A", "B")
)
);
$encodedMarkup = json_encode($replyMarkup);
$content = array(
'chat_id' => "10101010",
'reply_markup' => $encodedMarkup,
'text' => "Test"
);
$newn = json_encode($content);
$newh = json_decode($newn);
echo http_build_query($newh)