开发者

how to get JSON response in php from Facebook

开发者 https://www.devze.com 2023-01-11 19:12 出处:网络
I want to receive the JSON开发者_如何学Python Response from (Facebook) https://graph.facebook.com for further processing in PHP.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消