我已经把我的网络挂接,这让我更新,但我不知道如何发送InlineQueryResult
与php
我想发送这样的文字:
aaaaaaaaaaabbbbbbbbbcccccc
Run Code Online (Sandbox Code Playgroud)
我怎么能用php curl发送它?这就是我目前的尝试:
$token = 'bot###';
$chat_id = '###';
$keyboardl = ['inline_keyboard' => [[['text' => "one", 'callback_data' => "1"],['text' => "two", 'callback_data' => "2"]]]];
$data = array("chat_id" => $chat_id,"results" => "??????","reply_markup" => $keyboardl);
$data_string = json_encode($data);
$ch = curl_init('https://api.telegram.org/'.$token.'/answerinlinequery');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
echo $result;
}
Run Code Online (Sandbox Code Playgroud)
我不知道我必须使用哪个InlineQueryResult才能发送文本.