开发者

Parse Facebook comments graph API

开发者 https://www.devze.com 2023-02-26 11:46 出处:网络
i have been looking for a way to properly parse the JSON object or associative array of similar facebook feeds in PHP:

i have been looking for a way to properly parse the JSON object or associative array of similar facebook feeds in PHP:

https://graph.facebook.com/comments/?ids=http://lovebryan.com/fri开发者_如何转开发ends/layne/data/upimages/ClevelandForest.jpg

$request_url ="https://graph.facebook.com/comments/?ids=" . $purl;
$requests = file_get_contents($request_url);
$fb_response = json_decode($requests);

How can I implement a foreach function in PHP to extract the id's of each data member?


$fb_response = json_decode($json, true);

foreach($fb_response as $key => $value)
{
     // your code....
}
0

精彩评论

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