ActivityPost.Comments returning only 2 comments?

Feb 15, 2010 at 4:49 PM
Edited Feb 15, 2010 at 5:21 PM


As the title says, my code only seems to be coming up with 2 comments even if there are more comments in the post


//In FeedControl.cs

feedItem.ItemCommentsList = post.Comments.ToList<ActivityComment>();

//In FeedItem.cs
foreach (ActivityComment comment in ItemCommentsList)
     CommentItemControl commentItem = new CommentItemControl();
     commentItem.ItemName = comment.FromUser.Name;
     commentItem.ItemComment = comment.Text;
     BitmapImage profile = new BitmapImage(new Uri(comment.FromUser.PictureSquare), new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.Default));
     commentItem.ItemImage = profile;

Anyone have an idea of whats going on?


Feb 18, 2010 at 7:14 AM

I have noticed the same issue. I'll try to find a solution and will post here I can solve it.

If anyone how all comments be retrieved then please share with us here.

Feb 19, 2010 at 2:34 AM


by default only 2 or 3 comments are fetched for ActivityPost.

To get more comments use this method in the ActivivityPost class:

public void GetComments(int limit)

Together with the property CommentCount all comments or a number of comments can be fetched.


Feb 19, 2010 at 2:42 AM

Cool, my workaround involved some FQL, messy xml parsing, and a nasty collection of for and foreach loops :P. My question is GetComments(ActivityPost.CommentCount), would you rather call it as needed or prefetch? Im thinking prefecting would lead to a timeout.