Ajay Gupta
Ajay Gupta

Reputation: 76

Facebook - retrieving comment-count and likes-count?

I have a table with Facebook Post id. using this post id I want to retrieve post's comments count and likes count.

Any hint is very much appreciated.

Thanks

Upvotes: 0

Views: 2498

Answers (3)

Loïc Joachim
Loïc Joachim

Reputation: 109

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

I don't really know what you mean by a table but here is a post that details a similar problem.

Upvotes: 0

Mow
Mow

Reputation: 61

USE FQL

select likes.count, comments.count FROM stream WHERE post_id =POST_ID

Upvotes: 1

mlishn
mlishn

Reputation: 1667

You need to look into the Facebook API and atleast do some research before posting here.

This should give you some insight : http://developers.facebook.com/docs/reference/api/post/

Use the API to get the array response from Facebook based on the post. Then look through it to find the counts you desire.

You will need to obtain an access_token from Facebook in order to make an requests against the Facebook Graph. There are also plenty of tutorials and snippits out there when researched.

Good luck

Upvotes: 0

Related Questions