When I use the Graph API to fetch a comment containing an image, the returned JSON contains no reference to it, e.g.
{
"id": "10151452996201039_9302037",
"from": {
"name": "Anton Raxacoricofallapatorius Dyudin",
"id": "1534947411"
},
"message": "",
"can_remove": true,
"created_time": "2013-06-20T06:47:41+0000",
"like_count": 0,
"user_likes": false
}
I am likewise lost as to what POST field can be used to embed a picture when commenting. How can I achieve either of the above?
If you want a more extensive query that return everythings and I mean everything including user id's, profile image (large version), comment related info as well and attachement info use this.
&fields=id,status_type,created_time,from{name,id,picture.width(400).height(400)},message,picture.width(400).height(400),link,icon,comments{comments{attachment,from{picture.width(400).height(400),name},id,message,created_time},from{picture.width(400).height(400),name},id,message,attachment,created_time}
Add fields=attachment
to your query.
https://developers.facebook.com/docs/graph-api/reference/comment
It actually works when you use fields=attachment
https://graph.facebook.com/POSTID_COMMENTID?fields=attachment&access_token=ACCESS_TOKEN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With