0

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.

Ahmad Badpey
  • 6,348
  • 16
  • 93
  • 159

1 Answers1

0

Turn on GPS navigation on your device. If it's turned on, check permissions for your Telegram client.

PunyFlash
  • 1,030
  • 1
  • 6
  • 12