Hey dear friends how i can add inline button in my bot ?
for example i send /photo to bot and give a picture from bot and under picture a text shows in button and when click on that show next photo like this photo
https://core.telegram.org/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc
Telegram inline button in robots
Hi there,
Whenever you set up a shortcut on a task this will display a button like these. To display an image you would need to use a card, which can have shortcuts as part of them as well. The shortcut buttons work like keywords and so you would need to pass into another flow that is listening for each of your buttons.
Hey,
Sorry for the delay in responding.
In order to use the inline buttons you would need to do a Custom Request using the Telegram API for Inline Buttons.
The JSON required will be along the lines of:
{
"chat_id": "{{bot_new_message.channel_id}}",
"text": "Inline Buttons Example",
"reply_markup": {
"inline_keyboard": [
[{
"text": "test1",
"callback_data": "test1"
}],
[{
"text": "test2",
"callback_data": "test2"
}]
]
}
}
Thanks so muck my friend
and how can i send message or photo and… with callback data?
for example: click on test1 button and bot send flowxo logo to user?
Hi,
My appologies here, I’ve had to double check with the development team with regards to this, but unfortunately it appears we don’t actually support the callback_data for the inline keyboard at the moment. This has been raised for discussion with the developers to see if we can implement this feature in the future but I can’t give any guarantees on this.
If you could store the image that you’re wanting to send as a URL then you could have the inline button open this in a new window for the user using the top one of these options. To do this you would switch the callback_data line sent in the JSON above for:
"url": "https://community.flowxo.com"
Sorry for any confusion or inconvenience here.
Greetings, @KarenBarker!
At the end of April you wrote that there is no way to use the inline buttons in Flow XO!
What is the situation now?
Has anything changed since that time?
As far as I understand - so far nothing has changed.
If I am right, then please give an answer when you plan to support these methods.
I’m sorry to say that this still isn’t a supported feature. If that ever changes we’ll be sure to let people know.
Hi @DanielBeckett
Are there any approximate terms of produce supported feature? Should we wait 1 month? Or 3 months or half a year?
Unfortunately I don’t have a set time for when / if this feature will be implemented.
No set time just yet, sorry.
If this ever goes into development we’ll be sure to post an update over on the development roadmap.
maybe this can help you https://github.com/html5-ninja/inline-button-for-telegram-channel
Hi @DanielBeckett,
I use the same code to create inline buttons, but my chatbot in telegram writes me nothing and I have an error “The ‘method’ parameter is missing from metadata”
Could you please help me to fix it?
{
“chat_id”: “{{new_message.channel_id}}”,
“text”: “Inline Buttons Example”,
“reply_markup”: {
“inline_keyboard”: [
[{
“text”: “test1”,
“callback_data”: “test1”
}],
[{
“text”: “test2”,
“callback_data”: “test2”
}]
]
}
}
Hi Roman
For the request to work, You’ll just need to add metadata to the bottom of the custom request
You just need
method > sendMessage like so:
Unfortunately, we don’t support callback_data for the inline keyboard at the moment but you could instead use the reply keyboard which we do support
I hope that helps !
Sarah
Hi!
Were there any updates about supporting callback_data in inline keyboard?