I'm tryng to keep phonenumber of user in a telegram bot with this php script:
apiRequest("sendMessage", array(
    'chat_id' => $chat_id, 
    "text" => 'Ci vuoi inviare il tuo numero di telefono?', 
    'reply_markup' => array(
        'keyboard' => array(
            'text'=>"SHOW PHONE",
            'request_contact'=>true
        ),
        'one_time_keyboard' => true,
        'resize_keyboard' => true
    )
));
But it is not working, what could be the problem?
Keyboard must be array of arrays:
Update:
apiRequest("sendMessage", array(
'chat_id' => $chat_id, 
"text" => 'Ci vuoi inviare il tuo numero di telefono?', 
'reply_markup' => array(
        'keyboard' => array(
                           array(
                                array( 
                                  'text'=>"SHOW PHONE",
                                  'request_contact'=>true
                                )
                             )
                      ),
    'one_time_keyboard' => true,
    'resize_keyboard' => true
)
));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With