10

I have an idea to use a telegram bot for food ordering from a smartphone. So, you have a menu, prices, there is a payment gateway. This part seems clear to me.

I was wondering if there any way to get a geolocation information inside telegram? So smartphone owner location is sent automatically.

The alternative I see are:

  • writing address thru telegram (too much work and probably restaurant has to call back);
  • Install a small Android/iOS app just to send a location to the service. Kinda feels awkward, but a little better that first option.

Maybe you can see better ways, perhaps telegram already got some related functionality?

Thank you!

Johannes Kuhn
  • 14,778
  • 4
  • 49
  • 73
B.I.
  • 706
  • 3
  • 9
  • 19

1 Answers1

10

On some step (don't do it too early) you can send a button with the request_location field set to true.

When the user presses that button, Telegram asks the user if he wants to share his location with the bot.

The user then sends a location. Note that the user could also spoof the location.

Johannes Kuhn
  • 14,778
  • 4
  • 49
  • 73