나는 페이스 북에서 JSON 응답을 얻었다. $id
& $post_id
의 값을 검색하는 방법은 무엇입니까?PHP로 JSON 응답을 읽는 법
$response = json_decode (file_get_contents($graph_url));
$id = $response.id;
$post_id = $response.post_id;
print_r($response);
print_r($id);
print_r($post_id);
출력 :
stdClass Object ([id] => 232160686920835 [post_id] => 231794566957447_232160693587501)
& $post_id
$id
... 의 출력 없음 ...
javascript 용으로 PHP를 잘못 사용하고 있습니다.). 그냥'$ id = $ response-> id'를 사용하십시오 – Broncha