I'm trying out this Microblogger and I want to specify a target audience for each comment in the blog. So that different people see different comments depending on what audience group they belong to.

Is it possible to specify the audience group somwhere?

using (SPWeb web = SPContext.Current.Site.OpenWeb(siteUrl))
    SocialCommentManager scm = new SocialCommentManager(SPServiceContext.GetContext(web.Site));
    scm.AddComment(new Uri(siteUrl), "my message");

No, as Microblogger seems to use out-of-the-box Note Board to store the comments. Note Board comments do not support Audiences.

You would need to add that functionality to Microblogger yourself, but it will take some effort as you would need mapping table where you map specific comments to specific Audiences - and when showing comments you would compare that Audience mapping data with the Audiences where user belongs to.

  • Do you know of any similar techniques to get a chat going, where you can specify a target audience for each comment you post? – Niklas Sep 5 '13 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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