OpenSocial あれこれ (1)

とりあえず理解したのは、Widget に使用するJavaScript内で使用可能な、友人情報の取得とかのAPIを共通の形式にした、というもの。Social とかいっておきながら、GadgetのAPI Specも含まれます。

要するに、このAPIを使ってGoogle Gadgetを作っておけば、OpenSocial に対応したSNSに配置する限りは、意図した通りに動くよ、という者ですね。

以下、http://code.google.com/apis/opensocial/container.html より。

Your website can host third party OpenSocial apps integrated with your site's social network. The basic requirements are detailed in the OpenSocial API Specification.

Spec嫁、と。それはいいとして。

OpenSocial apps typically include gadgets, so you will need to provide a way to allow a user to add gadgets to their page. You can provide your own directory, link to hand-picked URLs, and/or allow users to add gadgets by URL. Gadgets are typically implemented as individual iframes within your containing page.

Gadget は iframe で実装されるよ。ここも想定の範囲内。iframe の src にガジェットを提供する XML への URI を配置する。

To host OpenSocial apps, your website must implement the OpenSocial API Specification. In most cases, this means that you connect your own social network's backends to the OpenSocial Service Provider Interface (SPI), which is part of Shindig, to allow an OpenSocial app to access your site's data. However, it is possible to use data from another social network as well, should you prefer. The SPI implements
* Adding and removing friends
* Adding and removing apps
* Storing activities
* Retrieving activity streams for self and friends
* Storing and retrieving per-app and per-app-per-user data

で、たぶんXMLの中にJavaScriptが埋め込まれていて、そこにOpenSocial API / OpenSocial Service Provider Interface経由で、Social Networkのデータを取りに行く部分があるから、そこがちゃんと動くように、実装しておいてね、ということらしい。

。。。とりあえずサンプル的なOpenSocialアプリケーションをWebJourney上で動かすまでにどれぐらい大変かをみてから考えようか。