我设法访问了用户配置文件内容:
using (SPSite ospSite = new SPSite("http://localhost:80/"))
{
ServerContext s = ServerContext.GetContext(ospSite);
UserProfileManager profileManager = new UserProfileManager(s);
UserProfile p = profileManager.GetUserProfile("some_user");
// e.g. responsibility retrieval
var r = p["SPS-Responsibility"];
var responsibilities = r.GetTaxonomyTerms();
}但我不知道如何访问用户的博客帖子集。
有什么建议吗?
发布于 2011-07-27 23:02:54
在SPSite循环中,子博客对象属于模板“SPWeb”。请在此处查看模板名称:
http://blogs.msdn.com/b/richin/archive/2011/07/04/sharepoint-2010-site-template-names.aspx
找到博客站点后,只需访问SPWeb对象的"Posts“列表中的项目即可。
https://stackoverflow.com/questions/6843935
复制相似问题