Hi All,
I want to fetch comments entered using SocialCommentControl from user profile social database. I tried following snippet in Managed CSOM API but could not succeed. Any help will greatly appreciated.
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("domain\\useracc", "pass@word1"); ClientContext clientContext = new ClientContext("http://testsitecollection/"); clientContext.Credentials = cred; PersonProperties owner = new PeopleManager(clientContext).GetPropertiesFor("domain\\useracc"); MicrofeedManager mgr = new MicrofeedManager(clientContext); clientContext.Load(mgr, f => f.CurrentUser); clientContext.Load(owner); clientContext.ExecuteQuery(); MicrofeedRetrievalOptions optn = new MicrofeedRetrievalOptions(); optn.ContentOnly = true; optn.IncludedTypes = MicroBlogType.All; optn.ResultSortOrder = MicrofeedSortOrder.CreatedTime; optn.NewerThan = DateTime.Today.AddDays(-2); ClientResult<MicrofeedThreadCollection> res = mgr.GetMyConsolidatedFeed(optn); clientContext.ExecuteQuery();
Thanks.