$args = array(
'name' => 'test',
'description' => 'xxxx',
'start_time' => 'xxxx',
'end_time' => 'xxxxx'
);
$target_url = "https://graph.facebook.com/me/events";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
$result = curl_exec($ch);
curl_close($ch);
{"id":"xxxx"}
我想這個ID在PHP $ id,這樣我就可以使用它進一步太.. 感謝。
嘗試'提取(json_decode('{「id」:「xxxxxx」}',true)); echo $ id;' – Baba
已更新問題 – user1863472
你'echo $ result'獲得返回值 – Baba