Uploaded on

 

More in: Business , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
532
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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