are supported (or in the process of being adopted) by a number of different social networks, such as orkut
, and Friendster
. Thanks to such broad support, a developer has to learn the APIs only once to be able to contribute applications to all these different social networks. Through OpenSocial, you will be able to interact seamlessly with your orkut communities and friends, write applications that leverage your shared interests with your friends on MySpace, and so on.
This article will guide you through the OpenSocial APIs and show you how to build a couple of social applications to share interests with friends. Figure 1 and Figure 2 show the final results: two applications, loaded within the orkut container to share travel experiences and movie preferences with a network of friends.
Introduction to Social Networks and OpenSocial
Figure 1. A Travel-Sharing Application Embedded Within orkut: This application is loaded within the orkut container to share travel experiences.
Figure 2. A Movie Preferences-Sharing Application Embedded Within orkut: This application is loaded within the orkut container to share movie preferences.
A social network is an ensemble of users who are linked to each other through a series of relationships (being friendly, being work colleagues, sharing common interests). Each user is characterized by a state
, which is a collection of all the variables required to describe the user fully, such as name, gender, hobbies, work, or contact information. Each user also has a series of relationships
that link him to his own friends on the network. Some networks also support the concept of activities
: streams of actions performed by the user within the network that alter his state or the set of his relationships with other people.
The OpenSocial APIs provide access to all these entities and are divided into the following major components, each responsible for a specific task:
- People and relationships: for accessing information on the user who is interacting with the application, his profile, and his relationships on the network
- Persistence: for manipulating the user state or profile and saving and loading additional information related to the user and required by the application
- Activities: for interacting with the user's activities stream, publishing new activities performed by the user, or listening to events that occurred to the user's friends
|Author's Note: The content is exclusively the personal opinion of the author. Under no circumstances should the content be attributed to any employer, past, present, or future, of the author, unless so stated explicitly by that individual or organization.|