Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Vietnam Social Network - Ketnooi - OpenSocial Support

Vietnam Social Network - Ketnooi - OpenSocial Support

Ratings: (0)|Views: 20|Likes:
Published by Ket Nooi
Ketnooi is vietnam social network fully support Opensocial 0.8.
Ketnooi is vietnam social network fully support Opensocial 0.8.

More info:

Published by: Ket Nooi on Jul 25, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/25/2011

pdf

text

original

 
Introduction to openSocial
Ketnooifully supports theOpenSocial
0.8 standard
, as well as some Ketnooi-specific extentions to it.Creating a basic Ketnooi-integrated app with openSocial is done using the typical webtechnologies (HTML, JS, Flash, PHP ...), and requests can be done using JS calls or REST calls, depending on the specific situation.Embedding an external application (e.g. written in flash or PHP) is as easy to embed inyour app as in any web site, using for example an iframe, or an embedded flash movie.The OpenSocial API allows your app to fetch and interact with Ketnooi's social data: the person currently using the app, profile information, friends, posting activities or notifications, etc...
A central concept for all apps: views
An openSocial app can have different 'views', depending on where to find it (or amanifestation of it) on the site. In the Ketnooi context, only 2 are really relevant:
Canvas view
- the 'large' view you will find on any app or brandpage with an app.
Profile view
- the 'profile component' view, how an app will look when a user installs it on a profile. Having a profile view is optional for an app, but of courseit is always nice to allow your users to show off your app to their visitors!Both views have a fixed width (720 resp. 320 px), but can be as high as you want. Theimages below show what would be respectively the
 profile
and the
canvas
view of thesame application:
 
Another central concept for all apps: the spec XML file
Each OpenSocial app starts from a
Specification
.xml file, which contains some basicinfo about the app, as well as the actual HTML and JS of the app itself. We call The most basic Hello World spec XML file looks like this:
view sourceprint ?01.<Module>02.<ModulePrefs title="Hello World!">03.<Require feature="opensocial-0.8" />04.</ModulePrefs>05.<Content type="html">06.<![CDATA[07.<!-- HTML and JS content be here, just as if this were the <body>content of a web site -->08.<script type="text/javaScript">alert(\'Hello world!\')</script>09.<h2>Hello world!</h2>10.]]>11.</Content>12.</Module> 
 Now would be good moment to take your first step in developing the application: copyand paste the above code in a .xml file, upload to an online location somewhere and pointto it in the Ketnooi OpenSocial Sandbox. If successful you should get both an alert boxand a header saying 'Hello world!'.
Some important remarks
... Knowing these up front may save you a lot of headaches.
As you can see above, your app is built up using HTML and JavaScript within the
content 
section of the XML spec.
Be aware that many OpenSocial JavaScript functions require that you explicitlyrequire features. To useKetnooi-specific extentions in your OpenSocial app, include
To resize your gadget with
gadgets.window.adjustHeight();
use:

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->