Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have written code like this

SPServiceContext context = SPServiceContext.GetContext(site);
Uri uri = new Uri("http://localhost:1000/");
var socialCommentManager = new SocialCommentManager(context);

// Get last 24 hrs notes
TimeSpan tInterval = new TimeSpan(24, 0, 0);
DateTime tSchedule = DateTime.Now - tInterval;

SocialComment[] allComments = socialCommentManager.GetComments(uri, 100, 0, tSchedule);

 foreach (SocialComment comment in allComments)
                {
// Print statement goes here
}

When I excute the code it returns only the home page notes not on other page or library. Am I missing anything here?

share|improve this question
add comment

1 Answer 1

Based on the API, it appears that SocialCommentManager.GetComments() methods only support getting all comments either by a particular user or a specific URL:

http://msdn.microsoft.com/en-us/library/microsoft.office.server.socialdata.socialcommentmanager_methods

It appears that you would have to iterate through either the users or the URLs you would like to retrieve the comments for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.