mardi 7 avril 2015

Cannot get image in facebook graph comment

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 from the feed:



$request = new FacebookRequest( $session, 'GET', '/' . $c_id . '/comments' );


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: http://ift.tt/1DftbUn


According to the documentation the attachment tag should be included?! http://ift.tt/13lJwrS


How can I get the image for the comment via gragh api?


Aucun commentaire:

Enregistrer un commentaire