SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

Your Answer


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.