OpenSocial and its usages
Asked Answered
P

1

6

I have looked for some explanation on the exact usages for the set of standards known as OpenSocial.

I need some clarification if I can use OpenSocial like the following.

I would like to create one library used to community with an OpenSocial api for use in my website that will not 'behave' like an application described by common sites like facebook and myspace. I'm not making a myspace of facebook application, I'm creating my own website and I want users to be able to find friends.

I would like to allow users to store usernames and passwords for various OpenSocial-supported social networks. I would also like to use the api to sync events from my web site to their specified social network. I would also like to allow my users to view a list of friends and invite them.

Is it possible to create one library that supports OpenSocial and simple "point" to and social network that supports it to get a list of friends and etc?

Pankey answered 12/6, 2009 at 9:45 Comment(0)
G
5

Many OpenSocial containers (social networking sites) support REST and/or RPC methods which can be used to access friend lists, post activities, etc. Several client libraries have been written to work with these APIs (http://wiki.opensocial.org/index.php?title=Client_Libraries). It is possible to use the client libraries to create a site which allows you to sign in with an account on a supported OpenSocial network and obtain a list of your friends.

However, it is not possible to authenticate against an OpenSocial API by storing a user's name and password and sending it to the social networking site. This is considered a poor design pattern and is discouraged. Instead, OpenSocial supports 3-legged OAuth, which involves redirecting a user to the social network where they input their credentials and are redirected back to your site with a token which can be used to access the user's data.

Note that not every site supports 3-legged OAuth, although at least MySpace, iGoogle, hi5, and Netlog do right now.

Once authenticated, you will be able to fetch data from pretty much any network. Posting activities back is supported on some networks, but not all of them at this time.

This approach does requires you to register your website with each social network you want to support, which can be a scaling problem. To try and help this, Google released Friend Connect, which ties together OpenSocial APIs from various networks to give you one interface which is easier to program against (full disclosure: I'm a Google employee and work with Friend Connect from time to time). I gave a talk at Google I/O this year describing such integrations with a website which may be of help. (Since I'm currently limited to posting a single link in my posts, it's up at http colon slash slash code.google.com/events/io/sessions/BeyondCutPasteGoogleFriendConnect.html)

I'm happy to elaborate further if you have additional questions.

Gailey answered 10/9, 2009 at 17:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.