Sharing Social Data
If you're running a social site, you can let users take their profiles and friends with them to other sites and applications by supporting the OpenSocial REST or RPC protocols.
Accessing Social Data
You can add social features to your site by accessing the data shared by social networks. You can also tell these networks about a user's actions on your site so activities will show up on the social sites.
How it works
The OpenSocial REST and RPC protocols can be used to transmit user data, friend lists, and activities from a social site to your application. OAuth allows the user to authorize access to his or her data stored in social networks. The basic flow is:
- A user logs in to a website and performs some action that requires social data.
- The website directs the user to a web page hosted on the social network's domain.
- This web page asks the user if the external website should to be able to access his or her data.
- If the user agrees, the website will receive an OAuth authorization token.
- The website can then include this token in requests made with the OpenSocial REST and RPC protocols.
There are several open source client libraries that make it easy to access the OpenSocial REST and RPC protocols in your favorite programming language.