Hello guys,
I'm trying to serve an HTML5 game via the new API, I did this so far:
bot.on('callback_query', function (msg) {
console.log(colors.blue('got an callback_query message'), arguments);
});
and I get this response when I click on the game button
{ '0':
{ id: 'xxx',
from: { id: 111, first_name: 'xxx', last_name: 'xxx' },
inline_message_id: 'xxx',
chat_instance: 'xxx',
game_short_name: 'xxx' } }
Given the game is already uploaded to a url: http://sampleurl/mygame, how can I serve it on the callback?
Thanks
BR
Heidar
I found the solution, I used:
bot.answerCallbackQuery(msg.id, gameLink, true, {url: gameLink});
you can close it
Nice. Closed
Could we please document this?
Or add an example?
@MCSH Could you build a small HTML5 game we could use for demo purposes?
Sure thing, I'll write an example as well using express for serving the game file (if that's okay)
Most helpful comment
I found the solution, I used:
bot.answerCallbackQuery(msg.id, gameLink, true, {url: gameLink});
you can close it