javascript - how to set parametr in bot api telegram for reply mark up keyboard? -
i know url send message in telegram bot api:
https://api.telegram.org/bottoken/sendmessage?chat_id=10101010&text="this test"
but how set parametr url use replymarkupkeyboard need url no code tnx
if found answer own:
for send replykeyboardmarkup url should use way:
https://api.telegram.org/bottoken/sendmessage?chat_id=10101010&text="test"&reply_markup={"keyboard":[["a","b"]]}
and find url (or use code send message) in php code is:
$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)
Comments
Post a Comment