user24829738
user24829738

Reputation: 23

Applying fullscreen to Telegram Mini App?

I am currently developing a Telegram Mini App, so basically a website which can be launched directly in Telegram by using a bot. I want the app to extend over the full screen size. Using the Telegram SDK and the window.Telegram.WebApp.expand() directive, I already achieved the expansion of the app to the top of the screen. On the bottom, however, the classic chat input field still remains and only disappears, when the WebApp.MainButton is enabled. I do not necessarily want to use the MainButton, but still have the app expanding all the way down, without showing the chat input.

Link to screenshot of my apps interface

I've seen it working for apps like NotCoin, TapSwap and Hamster Kombat, but as the code is not publicly available, I couldn't reproduce this behaviour so far.

Link to TapSwap Interface screenshot

Does anyone know, how to achieve this?

Upvotes: 2

Views: 10246

Answers (2)

Artur Tarverdyan
Artur Tarverdyan

Reputation: 24

In TapSwap you open the mini app via inline button, in your app you open it from Menu button of the bot. You need to send inline button on /start (or some other action).

For node.js looks like this

  const opts = {
    reply_markup: {
      inline_keyboard: [
        [
          {
            text: 'Inline button name',
            web_app:{ url: 'Link to your mini app' }
          }
        ]
      ]
    }
  };
  bot.sendMessage(chatId, 'Some welcome message here', opts);

Upvotes: -1

Gavin
Gavin

Reputation: 56

the TapSwap you see is Telegram Mini App. You need to create it in BotFather, then configure the Web App URL and finally you will get the Direct Link

Upvotes: 3

Related Questions