-3

Eg. I wanna get an album's information by graph api (me/albums )

The result didnt include comments / likes total count.

Also somebody says:

you must provide a parameter named "post_id"

However, albums has no "post_id".

I use graph path: "uid/feed" or "me/home"

The fb server returns result include total count.

I'm desired to know an object's total comments/likes count.(albums/photo/video)

Plz share your any idea with us,thanks a lot!

Kara
  • 6,115
  • 16
  • 50
  • 57
fansmey
  • 9
  • 1
  • 5

2 Answers2

3

Try to use something like this as the URL to fetch what you need:

https://graph.facebook.com/albumID/photos?fields=id,likes.summary(true),comments.summary(true)&access_token=XXXXXX

Here is a post that details a similar problem.

Community
  • 1
  • 1
Loïc Joachim
  • 89
  • 1
  • 8
0

You have to use /id/<connection> to retrieve this data. First get the id of the album (using /me/albums or /<uid>/albums) you want to get likes/comments for and then call following url for getting likes:

https://graph.facebook.com/<id>/likes?access_token=...

for comments:

https://graph.facebook.com/<id>/comments?access_token=...

Ashwini Dhekane
  • 2,280
  • 14
  • 19