Reputation: 179
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?
Upvotes: 4
Views: 10581
Reputation: 902
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
)
));
Upvotes: 11