I'm adding inline function to my bot. I'm using PHP only. I wrote this and it seems good to me:
$content = file_get_contents("php://input");
$update = json_decode($content, true);
$inlineQuery = isset($update["inline_query"]) ? $update["inline_query"] : "";
if ($inlineQuery["query"] !== "" ) {
$queryId = $inlineQuery["id"];
$collection = array(
"type" => "article",
"id" => $queryId,
"title" => "prov",
"input_message_content" => array( "message_text" => "ciao") ,
);
$parameters = array(
"inline_query_id" => $queryId,
"results" => $collection,
);
$parameters["method"] = "answerInlineQuery";
}
echo json_encode($parameters);
I get this error:
{"ok":false,"error_code":400,"description":"Bad Request: QUERY_ID_INVALID"}
What do I have to put in id? Thanks