I am accessing facebook through graph api with php, version 2.2. When a user writes a reply to a comment and attaches an image I dont know how to get a hold of the image!? I cannot see any info regarding the image in the api.
First I read the feed:
$request = new FacebookRequest( $session, 'GET', '/' . $pageid . '/feed?since=' . $dat );
Then I access comments for the feeds:
$request = new FacebookRequest( $session, 'GET', '/' . $c_id . '/comments' );
($c_id = 809559325802038_809564295801541)
The api returns:
[data] => Array
(
[0] => stdClass Object
(
[id] => 809559325802038_809565162468121
[from] => stdClass Object
(
[id] => 100002418214924
[name] => Conny Olsson
)
[message] => nice
[can_remove] => 1
[created_time] => 2015-04-07T12:25:36+0000
[like_count] => 0
[user_likes] =>
)
[1] => stdClass Object
(
[id] => 809559325802038_809573482467289
[from] => stdClass Object
(
[id] => 100002418214924
[name] => Conny Olsson
)
[message] => ok
[can_remove] => 1
[created_time] => 2015-04-07T12:51:52+0000
[like_count] => 0
[user_likes] =>
)
)
The comment on facebook has an attached image: https://www.facebook.com/vetgirignu/posts/809559325802038?comment_id=809564295801541
According to the documentation the attachment tag should be included?! https://developers.facebook.com/docs/graph-api/reference/v2.2/comment
How can I get the image for the comment via gragh api?