My application publishes posts on the user's wall and after a few days he is supposed to see how many comments/likes/shares he got.
So I posted the post using Stream.Publish and that works fine.
But I can't find the way to get the number of likes and comments.
(Actually I could get all the comments using Stream.GetComments using the post id - but this looks like a very heavy action in order to get only the count and it doesn't give me the likes)
I saw there is a class called stream_likes but I couldn't find how to get it for a specific post.
can anyone help me please?
Feb 19, 2010 at 6:46 PM
Edited Feb 19, 2010 at 7:08 PM
Did you figure this out?
I think this url might be relevant: http://wiki.developers.facebook.com/index.php/Stream.get
This is what I tried and it seems to work ok. It doesn't do exactly what I want, but I thought I would post it in case it helps you:
List<long> ids = new List<long>();
DateTime start = new DateTime(2001, 01, 01);
DateTime end = new DateTime(2011, 01, 01);
stream_data data = _api.Stream.Get(0, ids, start, end, 1, "");
int likeCount = data.posts.stream_post.likes.count;
int commentCount = data.posts.stream_post.comments.count;
In Stream.Get, the 5th parameter is where you set the number of items to retrieve. I want to be able to get a particular post id and I'm not sure how to set that. I think it's in the 6th parameter, but it's not clear to me yet.