Parse Facebook comments graph API
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....
}
精彩评论