Hi
i made webpart this is get newfeed and insert label.
I want to obtain a newsfeedsite http://nar-cla500s3:2222/(this is team collectionsite)
but Currentnewsfeedtogettheloginuserof the personal site.
using (SPSite site = new SPSite("http://nar-cla500s3:2222/"))
{
SPServiceContext context = SPServiceContext.GetContext(site);
using (new SPServiceContextScope(context))
{
SPSocialFeedManager sfm = new SPSocialFeedManager();
SPSocialFeedOptions options = new SPSocialFeedOptions();
options.SortOrder = SPSocialFeedSortOrder.ByCreatedTime;
options.MaxThreadCount = 1;
var aaa = sfm.GetFeed(SPSocialFeedType.News, options);
SPSocialThread thread = aaa.Threads[0];
Label1.Text = thread.RootPost.Text;
}
}
i need help, Thank you