How to get info on a posted post

Feb 18, 2010 at 2:06 PM

Hi all.

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<longids= new List<long>();
ids.Add(Convert.ToInt64(_targetId));
DateTime start = new DateTime(2001, 01, 01);
DateTime end = new DateTime(2011, 01, 01);
//stream_data data = _api.Stream.Get(ids, start, end, 1);
stream_data data = _api.Stream.Get(0, ids, start, end, 1, "");
statList.Add(stat);
int likeCount = data.posts.stream_post[0].likes.count;
int commentCount = data.posts.stream_post[0].comments.count;

List<long> ids = new List<long>();
ids.Add(Convert.ToInt64(_targetId));
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[0].likes.count;
int commentCount = data.posts.stream_post[0].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.

--
Christine