I made a telegram bot. Now I want to send a share button for posts into channel.
$btn =array('inline_keyboard'=>
array(
array(
array(
'text'=> 'share',
'switch_inline_query'=>"1111"
)
)
)
);
$btn = json_encode($btn);
$content = array
(
'chat_id' => $id,
'reply_markup' => $btn,
'text' => $textt,
);
$bot->sendMessage($content);
Now if I set a user_telegram_id of any user in instead of $id, this code works! But if I set the channel_telegram_id (in which the robot is admin) instead of $id this doesn't work! What should I do?
( Also if I use url and do not use switch_inline_query, then this code works for bot channel_telegram_id and user_telegram_id and I have no problem in this case )