telegram bot - php how to create inline button for share message -
telegram has bot, it's name @like. can create vote bot.
my problem share button. how can share, created voting message other user can or dislike it?
@like bot give me blew string sharing. how can achieve in php?
finally found how that. i'm using irazasyed/telegram-bot-sdk library laravel.
so share message can use: switch_inline_query
$inlinelayout[][] = keyboard::inlinebutton(['text' => 'forward me groups', 'switch_inline_query' => 'post_'.$post->id]); $keyboard = $this->telegram->replykeyboardmarkup([ 'inline_keyboard' => $inlinelayout, ]); $response = $this->telegram->sendmessage() ->replymarkup($keyboard) ->chatid($chatid) ->text("sample text") ->getresult();
Comments
Post a Comment