how to get JSON response in php from Facebook
I want to receive the JSON开发者_如何学Python Response from (Facebook) https://graph.facebook.com for further processing in PHP.
How can I access the JSON
I am not sure if its really an amateur question, be it so the answer is :
If you want to get the friends list:
$access_tok = $cookie['access_token'];
$friends_url = 'https://graph.facebook.com/me/friends?access_token=' . $access_tok;
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo curl_exec($c);
$page = json_decode(curl_exec($c));
curl_close($c);
...
More details on http://developers.facebook.com/docs/api
I hope that was your question. -varun
精彩评论