Successfully reported this slideshow.
Your SlideShare is downloading. ×

Introduction to OpenSocial

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Welcome togoogleapps
Welcome togoogleapps
Loading in …3
×

Check these out next

1 of 19 Ad

Introduction to OpenSocial

Download to read offline

These are the slides I prepared at Barcamp Berlin 2. I had the pleasure to present this together with David Recordon and we also had a great Q&A session with probably more questions than ansers

These are the slides I prepared at Barcamp Berlin 2. I had the pleasure to present this together with David Recordon and we also had a great Q&A session with probably more questions than ansers

Advertisement
Advertisement

More Related Content

Similar to Introduction to OpenSocial (20)

More from Christian Scholz (15)

Advertisement

Recently uploaded (20)

Introduction to OpenSocial

  1. Google‘s Open Social Christian Scholz http://mrtopf.de/connect Barcamp Berlin 2 http://comlounge.net
  2. Write once, run everywhere
  3. Google Gadget Application
  4. Google Gadget Application Platform
  5. Google Gadget Application OpenSocial API Platform
  6. Platform OpenSocial API Google Gadget Application OpenSocial API Platform
  7. Orkut Flixter Ning
  8. Example
  9. Writing Applications
  10. 1. Write a Google Gadget
  11. Example GG HTML <?xml version=quot;1.0quot; encoding=quot;UTF-8quot; ?> <Module> <ModulePrefs title=quot;Go to Photo Albumquot; height=quot;250quot; scaling=quot;falsequot; /> <Content type=quot;htmlquot;> <![CDATA[ <div style=quot;text-align:centerquot;><a id=quot;Riggsquot; title=quot;My Photo Albumquot; target=quot;_blankquot; href=quot;http://picasaweb.google.com/doc.examples/ShelfBoyquot;> <img border=quot;0quot; alt=quot;Photoquot; src=quot;http://doc.examples.googlepages.com/Riggsie-OP.jpgquot; title=quot;Click Here.quot;></a> </div> ]]> </Content> </Module>
  12. 2. Importing Open Social <ModulePrefs title=quot;Title of Your Applicationquot;> <Require feature=quot;opensocial-0.5quot;/> </ModulePrefs>
  13. 3. Using Open Social function onLoadFriends(dataResponse) { // do something with the dataResponse } /** * Request for friend information when the page loads. */ function getData() { document.getElementById('message').innerHTML = 'Requesting friends...'; var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest('VIEWER'), 'viewer'); req.add(req.newFetchPeopleRequest ('VIEWER_FRIENDS'), 'viewerFriends'); req.send(onLoadFriends); };
  14. 3. Using Open Social /** * Parses the response to the friend information request and generates * html to list the friends by their display name. * * @param {Object} dataResponse Friend information that was requested. */ function onLoadFriends(dataResponse) { var viewer = dataResponse.get('viewer').getData(); var html = 'Friends of ' + viewer.getDisplayName(); html += ':<br><ul>'; var viewerFriends = dataResponse.get('viewerFriends').getData(); viewerFriends.each(function(person) { html += '<li>' + person.getDisplayName(); }); html += '</ul>'; document.getElementById('message').innerHTML = html; };
  15. 3 APIs 1. People and Relationships 2. Persistence 3. Activities
  16. 3 APIs 1. People and Relationships 2. Persistence 3. Activities How are users between different social networks connected?
  17. Hosting Applications
  18. OpenSocial Service Provider Interface * 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
  19. more documentation still to come with SDK

×