irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Home Page:https://telegram-bot-sdk.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline Keyboard web_app

HydraCoderX opened this issue · comments

commented

Hi,
didnt find anywhere anything about it. But is it possible to open the inapp browser with an inline button?

->row([Keyboard::inlineButton(['text' => 'Book Ads', 'web_app' => 'https://url.com'])]

like this? with the "web_app" or did i muss something?

Greetings

commented

Hi, didnt find anywhere anything about it. But is it possible to open the inapp browser with an inline button?

->row([Keyboard::inlineButton(['text' => 'Book Ads', 'web_app' => 'https://url.com'])]

like this? with the "web_app" or did i muss something?

Greetings

$inlineLayout = [
    [
        Keyboard::inlineButton([
            'text' => 'Test',
            'web_app' => [
                'url' => 'https://test.ru'
            ]
        ]),
    ]
];

$keyboard = Keyboard::make([
    'inline_keyboard' => $inlineLayout
]);

$this->replyWithMessage([
    'text' => "Text",
    'reply_markup' => $keyboard
]);
$reply_markup = Keyboard::make()
				->inline()
				->row([
					Keyboard::inlineButton([
                        'text' => 'Test',
                        'web_app' => [
                            'url' => 'https://google.com'
                        ]
                    ])
				]);