Activities Overview

Gg249310.note(en-us,MSDN.10).gifNote:
Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

Activities are actions that a user takes within Windows Live. Activities are generated automatically, based on user actions such as updating the personal status message, adding a video, sharing a photo, adding a review, or tagging a person. If the user belongs to other social networking sites and generates activities from those sites, Windows Live can aggregate activity updates into Windows Live through those other websites or applications.

Windows Live Messenger Connect enables your site or application to connect your users to Windows Live. From the perspective of a Windows Live user, the following terms are helpful to know.

My activities

Activities generated by the principal Windows Live ID user whose context information is being retrieved

Contacts' activities

Activities generated by contacts or friends of the principal Windows Live ID user

Comments and replies

A comment on or a reply to an activity of the principal user or of a friend of the principal user

As an application developer, you will encounter the following terms (from the Activity Streams standard) in your work with activities.

Actor

In Windows Live, always the Windows Live ID user. An object of type Person represents the actor.

Verb

The action that the actor took.

Object

The direct recipient of the verb's action.

Target

The indirect recipient of the verb's action, or the result of that action.

An example of an activity that uses the Activity Streams format is "John Smith won a game of tic-tac-toe against Jane Dow." In this example, "John Smith" is the actor, "won" is the verb, "Jane Dow" is the object, and "tic-tac-toe" is the target.

You can access Activity resources by using the Messenger Connect Representational State Transfer (REST) API service or the Messenger Connect JavaScript Library.

The Activity resource for the REST API includes two collections: MyActivities and ContactActivities. The MyActivities collection contains a list of all activities for a specific user. The ContactActivities collection contains a list of all activities created in the current application for the specified user's friends. The data for these collections is represented either in Activity Streams format or JavaScript Object Notation (JSON) format. The following table describes the role of each of these elements.

Resource element JavaScript class Description

Activities Resource

Microsoft.Live.Services.Activity

A Messenger Connect resource that enables a user's web activities to be represented as a web data feed.

MyActivities Collection

Microsoft.Live.Services.ActivityCollection

A collection that contains a list of all activities for a specific user.

MyActivities Entry

Any of the methods for adding activities, such as Microsoft.Live.Services.AddStatusActivity.

A single item in the MyActivities collection; represents an activity undertaken by a specified user.

ContactsActivities Collection

Microsoft.Live.Services.ContactActivityCollection

A collection that contains a list of all activities in the current application for the specified user's friends. Activities created by other applications are not included in this resource type.

ContactsActivities Entry

Any of the methods for adding activities, such as Microsoft.Live.Services.AddStatusActivity.

A single item in the ContactsActivities collection; represents an activity undertaken by a specified user's friends.

The JavaScript library is built upon the REST API service. To use the JavaScript library, your application creates a data context to interact with Windows Live both locally and in the cloud. The data context manages collections of resources for the authenticated user. Depending on the level of consent that a user gives to your application, you can request either to view or to update the user's activity stream.

For more information about the data context, see Using the Data Context. For more information about the JavaScript library and activity templates, see Working with Activities (JavaScript Library).

You can access the Activity resource by using the REST API service or the JavaScript library. The following table lists the operations that are supported for the Activity resource and provides links to more information about using each operation.

Operation JavaScript library REST API service

Add an activity

Creating an Activity and Posting it to Your Activity Stream

Posting Activities in JSON Examples

Add a comment

Creating an Activity and Posting it to Your Activity Stream

Posting Activities in JSON Examples

Display an activity

Displaying Details for Activities

MyActivities Entry and ContactsActivities Entry

Operations that the Activity resource does not support are:

  • Updating activity information
  • Deleting an activity from the collection

When working with the activities of a Windows Live user, your application accesses a set of related properties. For a list of the properties that are unavailable to your application, see the Windows Live Developer Center.

Show: