<ul><li>Introduction </li></ul><ul><li>Features </li></ul><ul><li>OpenSocial APIs </li></ul><ul><li>Key concepts </li></ul...
<ul><li>  OpenSocial is a set of APIs for building social applications that run on the web.Developers can create applicati...
<ul><li>Many sites one API. </li></ul><ul><li>Based on gadget technology. </li></ul><ul><li>Server Optional. </li></ul><ul...
 
 
<ul><li>JavaScript API </li></ul><ul><li>Provides client-side access to People, Activities and Persistence. </li></ul><ul>...
<ul><li>People </li></ul><ul><li>Relationships </li></ul><ul><li>Activities </li></ul><ul><li>Persistence </li></ul><ul><l...
<ul><li>People are a fundamental part of social networking software and the OpenSocial API. </li></ul><ul><li>The Person o...
<ul><li>Two sets op people </li></ul><ul><li>  -VIEWER_FRIENDS </li></ul><ul><li>  -OWNER_FRIENDS </li></ul><ul><li>Openso...
<ul><li>Collection of actions a user has taken in the context of a given container. </li></ul><ul><li>Activity object prov...
<ul><li>locations where gadgets may be rendered in containers.  </li></ul><ul><li>Different types of views are… </li></ul>...
 
<ul><li>Address </li></ul><ul><li>Eg:Address.getField(‘region’).getValue(); </li></ul><ul><li>BodyType </li></ul><ul><li>E...
<ul><li><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> </li></ul><ul><li><Module> </li></ul><ul><li><ModulePr...
<ul><li>function loadFriends() { </li></ul><ul><li>var req = opensocial.newDataRequest(); </li></ul><ul><li>req.add(req.ne...
<ul><li>function onLoadFriends(data) {  </li></ul><ul><li>var viewer = data.get('viewer').getData();  </li></ul><ul><li>va...
 
 
 
 
<ul><li>www.opensocial.org </li></ul><ul><li>www.code.google.com/opensocial </li></ul>
 
Upcoming SlideShare
Loading in...5
×

Opensocial

554

Published on

Published in: Business, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
554
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Opensocial

  1. 2. <ul><li>Introduction </li></ul><ul><li>Features </li></ul><ul><li>OpenSocial APIs </li></ul><ul><li>Key concepts </li></ul><ul><li>Working </li></ul><ul><li>An example </li></ul><ul><li>Some OpenSocial Applications </li></ul>
  2. 3. <ul><li> OpenSocial is a set of APIs for building social applications that run on the web.Developers can create applications, using standard JavaScript and HTML, that run on social websites that have implemented the OpenSocial APIs. </li></ul>
  3. 4. <ul><li>Many sites one API. </li></ul><ul><li>Based on gadget technology. </li></ul><ul><li>Server Optional. </li></ul><ul><li>Based on simple Technologies. </li></ul><ul><li>Learn once & write anywhere. </li></ul><ul><li>--->more users for every applications. </li></ul><ul><li>--->more applications for every user. </li></ul>
  4. 7. <ul><li>JavaScript API </li></ul><ul><li>Provides client-side access to People, Activities and Persistence. </li></ul><ul><li>Build applications without maintaining your own server </li></ul><ul><li>Build applications that include a server-side component </li></ul><ul><li>RESTful API </li></ul><ul><li>Provides server-side access to People, Activities and Persistence </li></ul>
  5. 8. <ul><li>People </li></ul><ul><li>Relationships </li></ul><ul><li>Activities </li></ul><ul><li>Persistence </li></ul><ul><li>Views </li></ul>
  6. 9. <ul><li>People are a fundamental part of social networking software and the OpenSocial API. </li></ul><ul><li>The Person object provides access to a user's information. </li></ul><ul><li>There are two Person objects </li></ul><ul><li>VIEWER </li></ul><ul><li>OWNER </li></ul>
  7. 10. <ul><li>Two sets op people </li></ul><ul><li> -VIEWER_FRIENDS </li></ul><ul><li> -OWNER_FRIENDS </li></ul><ul><li>Opensocial APIs make no assumption on Relationships. </li></ul>
  8. 11. <ul><li>Collection of actions a user has taken in the context of a given container. </li></ul><ul><li>Activity object provides informations about activities . </li></ul><ul><li>Save state between sessions. </li></ul><ul><li>Only user scoped datas are allowed. </li></ul><ul><li>Server free applications. </li></ul>
  9. 12. <ul><li>locations where gadgets may be rendered in containers. </li></ul><ul><li>Different types of views are… </li></ul><ul><li>Profile vew </li></ul><ul><li>Canvas view </li></ul><ul><li>Home </li></ul><ul><li>Preview </li></ul>
  10. 14. <ul><li>Address </li></ul><ul><li>Eg:Address.getField(‘region’).getValue(); </li></ul><ul><li>BodyType </li></ul><ul><li>Eg;BodyType.getField(‘height’).getValue() </li></ul><ul><li>Person </li></ul><ul><li>Eg:person.Field.gender </li></ul><ul><li> person.Field.smoker </li></ul><ul><li> person.Field.NetworkPresence </li></ul>
  11. 15. <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?> </li></ul><ul><li><Module> </li></ul><ul><li><ModulePrefs title=&quot;Hello World!&quot;> <Require feature=&quot;opensocial-0.8&quot; /> </li></ul><ul><li></ModulePrefs> </li></ul><ul><li><Content type=&quot;html&quot;> </li></ul><ul><li><![CDATA[ </li></ul><ul><li>Hello, world! </li></ul><ul><li>]]> </li></ul><ul><li></Content> </li></ul><ul><li></Module> </li></ul>
  12. 16. <ul><li>function loadFriends() { </li></ul><ul><li>var req = opensocial.newDataRequest(); </li></ul><ul><li>req.add(req.newFetchPersonRequest(&quot;VIEWER“,’v’); </li></ul><ul><li>req.add(req.newFetchPersonRequest(&quot;VI EWE R_FRIENDS“,’vf’); </li></ul><ul><li>req.add(req.newFetchActivitiesRequest(&quot;VIEWER“,’av’); </li></ul><ul><li>req.send(onLoadFriends); </li></ul><ul><li>} </li></ul>
  13. 17. <ul><li>function onLoadFriends(data) { </li></ul><ul><li>var viewer = data.get('viewer').getData(); </li></ul><ul><li>var table=new SimpleTable(); </li></ul><ul><li>var Friends = data.get('viewerFriends').getData() asArray(); </li></ul><ul><li>for(var i=0;i<(friends.length);i++) </li></ul><ul><li>{ </li></ul><ul><li>table.addPersonRow(friends[i],’’); </li></ul><ul><li>} </li></ul><ul><li>html+=table.getHtml(); </li></ul><ul><li>document.getElementById(“Friends”.InnerHtml=html); </li></ul><ul><li>} </li></ul>
  14. 22. <ul><li>www.opensocial.org </li></ul><ul><li>www.code.google.com/opensocial </li></ul>

×