我用電報API嵌入機器人的一個問題...QUERY_ID_INVALID - 電報直列機器人
我的代碼:
$json = file_get_contents("php://input");
$dados = json_decode($json,true);
$id_query = $dados['inline_query']['id'];
$resultados_inline[] = [
'type' => 'article',
'id' => "1",
'title' => "Test",
'message_text' => "test",
];
$post[] = [
'inline_query_id' => $id_query,
'results' => serialize($resultados_inline),
];
$context_options = array(
'http' => array(
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($post) . "\r\n",
'content' => $post
)
);
file_get_contents("https://api.telegram.org/bot" . $api_telegram . "/answerInlineQuery",NULL,$context);
但我得到:
{ 「OK」: false,「error_code」:400,「description」:「BadRequest:QUERY_ID_INVALID」}
有人可以幫我嗎?
謝謝
謝謝,但你知道這個的原因?我可以修復什麼?這很奇怪... –