0
我的工作outlook api,我收到以下错误代码响应前景API给错误代码的请求参数
"error": {
"code": "request_parameter_missing",
"message": "The request entity body is missing a required parameter. The request must include at least one of these parameters: 'first_name', 'last_name', 'emails', 'employer'."
}
这里是我的代码
header('Content-Type: application/json; charset=utf-8');
$access_token = TOKEN;
$api_url = "https://apis.live.net/v5.0/me/contacts?&access_token=".$access_token;
$curl = curl_init($api_url);
$curl_data = array(
'first_name' => "Roberto",
'last_name' => "Tamburello"
);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$curl_response = curl_exec($curl);
echo"<pre>";
print_r($curl_response);
echo "</pre>";
我一直在寻找一些现在小时,我似乎无法理解我做错了什么。任何帮助将不胜感激