I'm using https://github.com/php-telegram-bot/ php library to make a telegram Bot.
To get location of user I wrote these Command:
public function execute ()
{
$data['chat_id'] = $this->getMessage()->getChat()->getId();
$data['reply_markup'] = (new Keyboard(
(new KeyboardButton('Send Location'))->setRequestLocation(true)
))
->setOneTimeKeyboard(true)
->setResizeKeyboard(true)
->setSelective(true);
$data['text'] = 'To send your location , touch below Button';
return Request::sendMessage($data);
}
"Send Location" Button shown But when User touch it, no things sent to program at all. this is while I'm using mobile device(no desktop Telegram ) and my location access.