2

i wrote php code for show keyboard to specific user in telegram bot but it's not working

$keyboradsValue = array(
   array("offtimeon","button 2"),
   array("button 3","button 4"),
   );
$replyMarkup = array(
  'keyboard' => $keyboradsValue,
  'resize_keyboard' => true,
  'force_reply' => true,
  'selective' => true
);
$encodedMarkup = json_encode($replyMarkup, true);

$url = $website . "/sendMessage?chat_id=-*************&text=@******&disable_web_page_preview=true&reply_markup=".$encodedMarkup;

file_get_contents($url);
Igor Drozdov
  • 14,690
  • 5
  • 37
  • 53

0 Answers0