You need to specify your markup like this :
1 2 3 4 |
$replyMarkup = array( 'force_reply' => true, 'selective' => true ); |
If you need to have custom keyboard you can follow this :
1 2 3 4 5 6 7 8 9 |
$keyboradsValue = array( array("button 1","button 2"), array("button 3","button 4"), ); $replyMarkup = array( 'keyboard' => $keyboradsValue, 'force_reply' => true, 'selective' => true ); |
After that you need to encode your object using json_encode
1 |
$encodedMarkup = json_encode($replyMarkup, true); |
Finally you just put above code at your query string at the rest of sendMessage.
近期评论