Reputation: 1523
I'm sending a link button throught a Telegram bot and I would like to get the callback_data after the user opens the url.
My options are:
var options = {
parse_mode: "Markdown",
reply_markup: {
inline_keyboard: btns
}
};
where btns is
[
[{ text: "Read first", url: "http://any", callback_data: "any_relevant_data }]
]
The button shows perfectly, the link works, but no callback is triggered and I never hit
bot.on('callback_query', (callback_message) => { //any action });
Is this a missing feature or it's me, doing something wrong?
Upvotes: 0
Views: 5836
Reputation: 8013
According to API Document, you can't use url
and text
in the same time.
This object represents one button of an inline keyboard.
You must use exactly one of the optional fields.
Upvotes: 2