pengrad / java-telegram-bot-api

Telegram Bot API for Java
https://core.telegram.org/bots
Apache License 2.0
1.79k stars 372 forks source link

InlineKeyboard not working #136

Closed PanCrucian closed 6 years ago

pengrad commented 6 years ago

Example?

PanCrucian commented 6 years ago

@pengrad

SendMessage message = new SendMessage(chatId, "Nope, not working");
message.parseMode(ParseMode.HTML);
InlineKeyboardMarkup keyboard = new InlineKeyboardMarkup(
        new InlineKeyboardButton[]{
               new InlineKeyboardButton("url").url("url"),
               new InlineKeyboardButton("callback_data").callbackData("callback_data"),
               new InlineKeyboardButton("switch_inline_query").switchInlineQuery("switch_inline_query")
        });
message.replyMarkup(keyboard);
bot.execute(message);

@pengrad and then nothing happens, no message in the chat of bot

pengrad commented 6 years ago

How about to check response from Telegram API? {"ok":false,"error_code":400,"description":"Bad Request: BUTTON_URL_INVALID"}

PanCrucian commented 6 years ago

@pengrad hmmm, i will check 5 mins

PanCrucian commented 6 years ago

@pengrad Well, response is null

SendResponse{result=null}

upd: @pengrad ReplyKeyboardMarkup working fine, but InlineKeyboardMarkup not working

pengrad commented 6 years ago

And description is not

PanCrucian commented 6 years ago

@pengrad oh, I think I understand. Sorry, but a telegram api and a description of your java api confused me. Now everything is clear, once again sorry for issue. Close