对 KeyboardButton 电报机器人使用 request_contact
Use request_contact for KeyboardButton telegram Bot
我正在尝试使用此 php 脚本将用户的电话号码保留在电报机器人中:
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
)
));
但它不工作,可能是什么问题?
键盘必须是数组的数组:
更新:
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
)
));
我正在尝试使用此 php 脚本将用户的电话号码保留在电报机器人中:
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
)
));
但它不工作,可能是什么问题?
键盘必须是数组的数组:
更新:
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
)
));