Getting Activities

Last modified: July 12, 2010

Applies to: Office 2007 | Outlook 2010 | SharePoint Server 2010

The OSC calls the ISocialProvider::GetCapabilities method to determine the capabilities of the OSC provider for a social network. If the getActivities and cacheActivities elements in the returned capabilities XML indicate that the OSC provider supports getting activities, and caching activities as Outlook RSS items in a hidden folder, the OSC can make the following calling sequence. The OSC calls methods in the following sequence to get activities and information (as supported by the ISocialPerson interface) for friends on the social network:

  1. ISocialSession::GetLoggedOnUser —At the end of the authentication process, the OSC calls GetLoggedOnUser to obtain an ISocialProfile interface for the user being authenticated. For more information on authentication, see Basic Authentication and Forms-Based Authentication.

  2. ISocialProfile::GetActivitiesOfFriendsAndColleagues —Using the ISocialProfile interface obtained from step 1, the OSC gets a string that represents a collection of activities for friends of the logged-on user. This string conforms to the schema definition for the activityFeed element.

  3. ISocialSession::GetPerson —For each activityDetails element in the activityFeed XML returned by GetActivitiesOfFriendsAndColleagues, there is an ownerID element that indicates the person who owns that activity. The OSC uses that ownerID value to call GetPerson to get an ISocialPerson interface for that person.

  4. ISocialPerson::GetDetails —Based on the ISocialPerson object obtained from step 3, the OSC calls GetDetails to get details for that person, such as the first name and last name. The OSC can do the same for each activity specified in an activityDetails element in the activityFeed XML returned by GetActivitiesOfFriendsAndColleagues in step 2.

Note Note

The OSC refreshes the activities cache at a default interval. For more information about refreshing the activities cache, see Synchronizing Friends and Activities.