Getting Activities

Office 2013 and later

The OSC calls the ISocialProvider::GetCapabilities method to determine the capabilities of the OSC provider for a social network. If the getActivities and dynamicActivitiesLookupEx elements in the returned capabilities XML indicate that the OSC provider supports getting activities on demand and storing activities in memory, the OSC can make the following calling sequence. The OSC also notes the hash function specified in the hashFunction element in the capabilities XML. The OSC calls methods in the following sequence to get activities and information (as supported by the ISocialPerson interface) for friends and non-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. ISocialSession2::GetActivitiesEx —For the persons displayed in the Outlook People Pane, the OSC obtains and hashes their SMTP addresses, calls ISocialSession2::GetActivitiesEx, and stores (in memory) the activities data returned for these persons. The OSC gets in an output parameter, activities, which is a string that contains 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 GetActivitiesEx, 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 GetActivitiesEx 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.

Show: