Facebook API get post details from feed

Wednesday, November 4, 2015

I'm using the PHP Facebook API (together with laravel)



I can manage to get the feed from a page, with all it's post using



    $request = Facebook::get('/COMPANYPAGE?fields=feed.limit(25)');
$response = $request->getGraphPage()->getField('feed');


This returns the following objects



enter image description here




But I can't seem to get the specific information for that post! Like
the images included.. Is there another call I need to perform?




I tried the following but it's giving me back the same results



    $request = Facebook::get('/elbeko?fields=feed.limit(25)');
$response = $request->getGraphPage()->getField('feed');

foreach($response as $item) {
$post = Facebook::get($item['id'])->getGraphObject();
}

0 comments:

Post a Comment