I want to create a message with telegram api that users could share(forward) it along its inline keyboard buttons.
I know with telegram api you can create a message that contains inline keyboard by adding inline_keyboard
array in replay_markup
of a message
but when I forward this message inside telegram just the text part of the message forwards and buttons wont.
In brief I want to know is it possible to create a message with telegram api that when someone forwards this message inline keyboard of that message forwards too.
You can't attach inline keyboard in the forwarded message, but you can add a “Share” button, and use switch_inline_query
in inline keyboard.
For instance: Users can use @Sean_Bot TeleBot
to send a photo with inline buttons, if they want to keep inline buttons, they should click “Share” button instead of directly forward.
InlineKeyboardButton with "url" or "login_url" parameter can be forwarded. Note: if there is another button in keyboard without "url" or "login_url" parameter whole keyboard woudn't be shown
url
and login_url
. If all keyboard buttons will be with one of these two fields, the whole keyboard will be preserved when forwarding –
Styptic You can't attach inline keyboard in the forwarded message, but you can add a “Share” button, and use switch_inline_query
in inline keyboard.
For instance: Users can use @Sean_Bot TeleBot
to send a photo with inline buttons, if they want to keep inline buttons, they should click “Share” button instead of directly forward.
© 2022 - 2024 — McMap. All rights reserved.