Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How can you access or create a list on a My Site host (i.e. a custom WebPart on main.example.com accessing information that is hosted on my.example.com)? I want to have a store for user settings that can be shared between sites/applications (could be a list of links, or favourites, widget settings etc). If the site doesn't already exist for the user (e.g. my.example.com/personal/username) then how can you create it through code alone (rather than them using the 'my content' link in My Site to create it)?

Another example of functionality I want to build is the ability for the user to access items they have tagged, to show in a popup or dropdown (probably grouped under the content type) when they click 'tags and notes' (instead of going to My Site > Tags and Notes).

share|improve this question
    
Did you ever find a solution for this question? Maybe you could add it below. –  Kit Menke Jul 15 '11 at 19:04

1 Answer 1

You can call CreatePersonalSite off the Profile. See: MSDN Documentation

public void CreatePersonalSiteSample()
{
  //get current service context
  SPServiceContext serviceContext = SPServiceContext.Current;

  //initialize user profile config manager object
  UserProfileManager upm = new UserProfileManager(serviceContext);
  string sAccount = "mydomain\\myalias";
  UserProfile u = upm.GetUserProfile(sAccount);
  u.CreatePersonalSite();
  SPSite mysite = u.PersonalSite;
  string myurl = u.PersonalUrl;
}

For Social Tags you can use the SocialTagManager.GetTags method. http://msdn.microsoft.com/en-us/library/microsoft.office.server.socialdata.socialtagmanager.gettags.aspx

share|improve this answer

Your Answer

 
discard

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.