SlideShare une entreprise Scribd logo
1  sur  60
The Open & Social Web


    Chris Chabot
    Developer Advocate, Google
The Web is better when it’s
Social
David Glazer, Director of Engineering
at the launch of OpenSocial, Nov 2007
a.k.a. “The Registration Hell”
a.k.a. “The Registration Hell”



  92%
Success
 Rate!
OpenSocial’s Growth
In other words..
The Web is going social


   ... and the Social Web is
                 going open
Using OpenSocial




         OpenSocial Concepts
What OpenSocial Provides
Using OpenSocial - Viewer and Owner


                 Dan (OWNER)




                 Chris (VIEWER)
Using OpenSocial - Viewer and Owner



             http://chabotc.com (OWNER)




                  Chris (VIEWER)
Using OpenSocial - Viewer and Owner




          Dan’s Friends (OWNER FRIENDS)
Using OpenSocial - Viewer and Owner



          My Friends (VIEWER FRIENDS)
Using OpenSocial - Views

  • OpenSocial differentiates different page types
    – Home
      • Personal home page
      • Owner == Viewer
    – Profile
      • Someone else looking at your page
      • Owner && Viewer
    – Canvas
      • Full screen gadget view
      • Owner && Viewer
HTML
             XML


 JS

       Writing a Gadget
OpenSocial Gadget - Gadget XML

  <?xml version="1.0" encoding="UTF-8" ?>
   <Module>
     <ModulePrefs title="Hello World!">
       <Require feature="opensocial-0.8" />
     </ModulePrefs>
     <Content type="html" view=”profile”>
       <![CDATA[
         Hello, world!
       ]]>
     </Content>
   </Module>
OpenSocial Gadget - onLoad handler

  <?xml version="1.0" encoding="UTF-8" ?>
   <Module>
     <ModulePrefs title="Hello World!">
       <Require feature="opensocial-0.8" />
     </ModulePrefs>
     <Content type="html">
       <![CDATA[
       <script type=”text/javascript”>
       function init() {
         loadFriends();
       }
       gadgets.util.registerOnLoadHandler(init);
       </script>
       ]]>
     </Content>
   </Module>
OpenSocial Gadget - Fetching Friends
function loadFriends() {
  var req = opensocial.newDataRequest();

    req.add(req.newFetchPersonRequest(
      opensocial.IdSpec.PersonId.VIEWER),'viewer');

    var viewerFriends = opensocial.newIdSpec({
      "userId" : "VIEWER",
      "groupId" : "FRIENDS"
    });

    req.add(
      req.newFetchPeopleRequest(
        viewerFriends),
      'viewerFriends');

    req.send(onLoadFriends);
}
OpenSocial Gadget - Using the result
function onLoadFriends(data) {
  var viewer = data.get('viewer').getData();
  var viewerFriends = data.get('viewerFriends').getData();
  html = new Array();
  html.push('<ul>');
  viewerFriends.each(function(person) {
    html.push(
       '<li>' + person.getDisplayName() + "</li>"
    );
  });
  html.push('</ul>');
  document.getElementById('friends').innerHTML =
    html.join('');
}
OpenSocial Gadget - OSDA




     http://osda.appspot.com
OpenSocial Gadget - OSDA
OpenSocial Gadget - OSDA
Server to Server
OpenSocial - OpenSocial Client Libraries

  • For Server to Server, use the REST API
  • Libraries exist for popular languages:
    – http://code.google.com/p/opensocial-php-client/
    – http://code.google.com/p/opensocial-java-client/
    – http://code.google.com/p/opensocial-ruby-client/
    – http://code.google.com/p/opensocial-python-client/
    – http://code.google.com/p/opensocial-as3-client/




                                                   36
OpenSocial - OpenSocial Client Libraries
<?php

$storage    =   new osapiFileStorage('/tmp/osapi');
$provider   =   new osapiNetlogProvider();
$auth       =   osapiOAuth3Legged::performOAuthLogin(....);
$osapi      =   new osapi($provider, $auth);

$batch = $osapi->newBatch();

$batch->add(
  $osapi->people->get(
    array(
      'userId' => $userId,
      'groupId' => '@self'
    ), 'self');

$result = $batch->execute();

?>
OpenSocial - OpenSocial Client Libraries
• iGoogle, Gmail
    • $provider = new osapiGoogleProvider();
• Google Friend Connect
    • $provider = new osapiFriendConnectProvider();
• Hi5
    • $provider = new osapiNetlogProvider();
• MySpace
    • $provider = new osapiMySpaceProvider();
• Netlog
    • $provider = new osapiNetlogProvider();
• orkut
    • $provider = new osapiOrkutProvider();
• Partuza
    • $provider = new osapiPartuzaProvider();
• Plaxo
    • $provider = new osapiPlaxoProvider();
• XRDS (discovery)
    • $provider = new osapiXRDSProvider(‘http://www.example.org’);
• Custom
    • $provider = new osapiProvider(‘requestTokenUrl’, ‘authUrl’,
  ‘accessTokenUrl’, ‘restEndpoint’, ‘rpcEndpoint’);
Social, anywhere?
Google Friend Connect
 • May 2008 Google Friend Connect preview
   – Preview release, for whitelisted sites only
   – Make your website social
   – Long tail, no technical skills required
   – Copy and past javascript
   – Add OpenSocial applications
 • December 2008 General availability
 • February 2009 Social bar
   – Easier integration
 • March 2009
   – Allow deep customized integration through outside of IFrame JS
   – Server side integration (REST API’s)




                                                                      40
Friend Connect - outside of the IFrame
Friend Connect - outside of the IFrame




    http://www.ossamples.com/api/
Friend Connect - outside of the IFrame
Friend Connect - REST API
OpenSocial - What’s ahead ?
  OpenSocial 0.9 and beyond
Proxied Content
Proxied Content
Proxied Content


  <?xml version="1.0" encoding="UTF-8" ?>
   <Module>
     <ModulePrefs title="Hello World!">
       <Require feature="opensocial-0.9"/>
     </ModulePrefs>
     <Content view=”profile” type="html"
         href=”http://example.org/profile.php”>
       <os:ViewerRequest key="vwr"/>
       <os:OwnerRequest key="ownr"/>
     </Content>
   </Module>
Lightweight JS - OSAPI



osapi.people.getViewer({
    fields: ['name', 'birthday']
  }).execute(function(result) {
    alert('Your name is ' + result.name + '!');
    alert('Your birthday is ' + result.birthday + '!');
});
OSML tags
• OpenSocial Markup Language
  • os:PeopleSelector
  • os:Name
  • os:Badge
  • os:Get
<form action="/top_friends.php" method="POST">
  Select your top 8 friends:
  <os:PeopleSelector
     group="${ViewerFriends}"
     multiple="true"
     max="8"
     inputName="top8"
  />
</form>
OpenSocial Templating & Data-Pipelining
...
<Require feature="opensocial-data" />
<Require feature="opensocial-templates">
...
<script type="text/os-data"
  xmlns:os="http://ns.opensocial.org/2008/markup">
<os:HttpRequest key="song"
  href="http://mysongserver.com"/
</script>
 
<script type="text/os-template">
<a href="${song.url}">
  <img src="${song.albumThumbnail}"/>
  ${song.title} By ${song.artist} From ${song.album}
</a>
</script>
And going to new places..
Going to new places..
Going to new places..
Going to new places..
Going to new places..
Resources
Getting started:
http://www.opensocial.org/
Documentation:
http://wiki.opensocial.org
Friend Connect:
http://www.google.com/friendconnect
Google I/O Social Videos
Find them at:
http://code.google.com/events/io/sessions.htm
• Beyond Cut & Paste: Deep integrations with Google Friend Connect
• Building a Business with Social Apps
• Designing OpenSocial Apps for Speed and Scale
• Google and the Social Web
• Google Friend Connect Gadgets: Best Practices in Code and Interaction Design
• Google Friend Connect In The Real World
• Powering Mobile Apps with Social Data
• The Social Web: An Implementor's Guide
The Open & Social Web



       Q&A

Contenu connexe

Tendances

Social Web Course @VU Amsterdam: Final Student Presentations
Social Web Course @VU Amsterdam: Final Student PresentationsSocial Web Course @VU Amsterdam: Final Student Presentations
Social Web Course @VU Amsterdam: Final Student Presentations
Lora Aroyo
 
Tagging - Can User Generated Content Improve Our Services?
Tagging - Can User Generated Content Improve Our Services?Tagging - Can User Generated Content Improve Our Services?
Tagging - Can User Generated Content Improve Our Services?
guestff5a190a
 

Tendances (20)

Social Web Course @VU Amsterdam: Final Student Presentations
Social Web Course @VU Amsterdam: Final Student PresentationsSocial Web Course @VU Amsterdam: Final Student Presentations
Social Web Course @VU Amsterdam: Final Student Presentations
 
VU University Amsterdam - The Social Web 2016 - Lecture 5
VU University Amsterdam - The Social Web 2016 - Lecture 5VU University Amsterdam - The Social Web 2016 - Lecture 5
VU University Amsterdam - The Social Web 2016 - Lecture 5
 
VU University Amsterdam - The Social Web 2016 - Lecture 6
VU University Amsterdam - The Social Web 2016 - Lecture 6VU University Amsterdam - The Social Web 2016 - Lecture 6
VU University Amsterdam - The Social Web 2016 - Lecture 6
 
VU Amsterdam: Social Web Course: Lecture1: Introduction to Social Web
VU Amsterdam: Social Web Course: Lecture1: Introduction to Social Web VU Amsterdam: Social Web Course: Lecture1: Introduction to Social Web
VU Amsterdam: Social Web Course: Lecture1: Introduction to Social Web
 
Web 2.0: Implications For The Cultural Heritage Sector
Web 2.0: Implications For The Cultural Heritage SectorWeb 2.0: Implications For The Cultural Heritage Sector
Web 2.0: Implications For The Cultural Heritage Sector
 
Task 8- group 3- cei-ufmg
Task 8- group 3- cei-ufmgTask 8- group 3- cei-ufmg
Task 8- group 3- cei-ufmg
 
Using Web 2.0 Principles to Become Librarian 2.0: Introduction
Using Web 2.0 Principles to Become Librarian 2.0: IntroductionUsing Web 2.0 Principles to Become Librarian 2.0: Introduction
Using Web 2.0 Principles to Become Librarian 2.0: Introduction
 
Web 2.0 2011_2012
Web 2.0 2011_2012Web 2.0 2011_2012
Web 2.0 2011_2012
 
Web2 UKOLN MLA Workshop
Web2 UKOLN MLA WorkshopWeb2 UKOLN MLA Workshop
Web2 UKOLN MLA Workshop
 
Web 2.0, Web Social
Web 2.0, Web SocialWeb 2.0, Web Social
Web 2.0, Web Social
 
Inn530 ass2 7.6
Inn530 ass2 7.6Inn530 ass2 7.6
Inn530 ass2 7.6
 
Blogs, Wikis and more: Web 2.0 demystified for information professionals
Blogs, Wikis and more: Web 2.0 demystified for information professionalsBlogs, Wikis and more: Web 2.0 demystified for information professionals
Blogs, Wikis and more: Web 2.0 demystified for information professionals
 
DM110 - Week 1 - Introductions / Web 2.0
DM110 - Week 1 - Introductions / Web 2.0DM110 - Week 1 - Introductions / Web 2.0
DM110 - Week 1 - Introductions / Web 2.0
 
Tagging - Can User Generated Content Improve Our Services?
Tagging - Can User Generated Content Improve Our Services?Tagging - Can User Generated Content Improve Our Services?
Tagging - Can User Generated Content Improve Our Services?
 
Social Bookmarking
Social BookmarkingSocial Bookmarking
Social Bookmarking
 
Potential and issues of Web 2.0
Potential and issues of Web 2.0Potential and issues of Web 2.0
Potential and issues of Web 2.0
 
Web 1.0, 2.0 & 3.0
Web 1.0, 2.0 & 3.0Web 1.0, 2.0 & 3.0
Web 1.0, 2.0 & 3.0
 
Web 2.0 Technologies and iPods for Research and Mobility
Web 2.0 Technologies and iPods for Research and MobilityWeb 2.0 Technologies and iPods for Research and Mobility
Web 2.0 Technologies and iPods for Research and Mobility
 
Army Library Training Institute
Army Library Training InstituteArmy Library Training Institute
Army Library Training Institute
 
Web 2.0
Web 2.0 Web 2.0
Web 2.0
 

Similaire à The Open & Social Web - Kings of Code 2009

Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
Patrick Chanezon
 
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Atlassian
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
Pamela Fox
 
Nk API - examples
Nk API - examplesNk API - examples
Nk API - examples
nasza-klasa
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
Gavin Roy
 

Similaire à The Open & Social Web - Kings of Code 2009 (20)

Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocial
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Eu odeio OpenSocial
Eu odeio OpenSocialEu odeio OpenSocial
Eu odeio OpenSocial
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
 
Ajaxworld Opensocial Presentation
Ajaxworld Opensocial PresentationAjaxworld Opensocial Presentation
Ajaxworld Opensocial Presentation
 
Open social
Open socialOpen social
Open social
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
 
Open social & cmis oasistc-20100712
Open social & cmis   oasistc-20100712Open social & cmis   oasistc-20100712
Open social & cmis oasistc-20100712
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
 
Nk API - examples
Nk API - examplesNk API - examples
Nk API - examples
 
Opensocial
OpensocialOpensocial
Opensocial
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJS
 
The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
SEA Open Hack - YAP
SEA Open Hack - YAPSEA Open Hack - YAP
SEA Open Hack - YAP
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

The Open & Social Web - Kings of Code 2009

  • 1. The Open & Social Web Chris Chabot Developer Advocate, Google
  • 2. The Web is better when it’s Social David Glazer, Director of Engineering at the launch of OpenSocial, Nov 2007
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9. a.k.a. “The Registration Hell” 92% Success Rate!
  • 12. The Web is going social ... and the Social Web is going open
  • 13. Using OpenSocial OpenSocial Concepts
  • 15. Using OpenSocial - Viewer and Owner Dan (OWNER) Chris (VIEWER)
  • 16. Using OpenSocial - Viewer and Owner http://chabotc.com (OWNER) Chris (VIEWER)
  • 17. Using OpenSocial - Viewer and Owner Dan’s Friends (OWNER FRIENDS)
  • 18. Using OpenSocial - Viewer and Owner My Friends (VIEWER FRIENDS)
  • 19. Using OpenSocial - Views • OpenSocial differentiates different page types – Home • Personal home page • Owner == Viewer – Profile • Someone else looking at your page • Owner && Viewer – Canvas • Full screen gadget view • Owner && Viewer
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. HTML XML JS Writing a Gadget
  • 28. OpenSocial Gadget - Gadget XML <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Hello World!"> <Require feature="opensocial-0.8" /> </ModulePrefs> <Content type="html" view=”profile”> <![CDATA[ Hello, world! ]]> </Content> </Module>
  • 29. OpenSocial Gadget - onLoad handler <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Hello World!"> <Require feature="opensocial-0.8" /> </ModulePrefs> <Content type="html"> <![CDATA[ <script type=”text/javascript”> function init() { loadFriends(); } gadgets.util.registerOnLoadHandler(init); </script> ]]> </Content> </Module>
  • 30. OpenSocial Gadget - Fetching Friends function loadFriends() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest( opensocial.IdSpec.PersonId.VIEWER),'viewer'); var viewerFriends = opensocial.newIdSpec({ "userId" : "VIEWER", "groupId" : "FRIENDS" }); req.add( req.newFetchPeopleRequest( viewerFriends), 'viewerFriends'); req.send(onLoadFriends); }
  • 31. OpenSocial Gadget - Using the result function onLoadFriends(data) { var viewer = data.get('viewer').getData(); var viewerFriends = data.get('viewerFriends').getData();   html = new Array(); html.push('<ul>'); viewerFriends.each(function(person) { html.push( '<li>' + person.getDisplayName() + "</li>" ); }); html.push('</ul>'); document.getElementById('friends').innerHTML = html.join(''); }
  • 32. OpenSocial Gadget - OSDA http://osda.appspot.com
  • 36. OpenSocial - OpenSocial Client Libraries • For Server to Server, use the REST API • Libraries exist for popular languages: – http://code.google.com/p/opensocial-php-client/ – http://code.google.com/p/opensocial-java-client/ – http://code.google.com/p/opensocial-ruby-client/ – http://code.google.com/p/opensocial-python-client/ – http://code.google.com/p/opensocial-as3-client/ 36
  • 37. OpenSocial - OpenSocial Client Libraries <?php $storage = new osapiFileStorage('/tmp/osapi'); $provider = new osapiNetlogProvider(); $auth = osapiOAuth3Legged::performOAuthLogin(....); $osapi = new osapi($provider, $auth); $batch = $osapi->newBatch(); $batch->add( $osapi->people->get( array( 'userId' => $userId, 'groupId' => '@self' ), 'self'); $result = $batch->execute(); ?>
  • 38. OpenSocial - OpenSocial Client Libraries • iGoogle, Gmail • $provider = new osapiGoogleProvider(); • Google Friend Connect • $provider = new osapiFriendConnectProvider(); • Hi5 • $provider = new osapiNetlogProvider(); • MySpace • $provider = new osapiMySpaceProvider(); • Netlog • $provider = new osapiNetlogProvider(); • orkut • $provider = new osapiOrkutProvider(); • Partuza • $provider = new osapiPartuzaProvider(); • Plaxo • $provider = new osapiPlaxoProvider(); • XRDS (discovery) • $provider = new osapiXRDSProvider(‘http://www.example.org’); • Custom • $provider = new osapiProvider(‘requestTokenUrl’, ‘authUrl’, ‘accessTokenUrl’, ‘restEndpoint’, ‘rpcEndpoint’);
  • 40. Google Friend Connect • May 2008 Google Friend Connect preview – Preview release, for whitelisted sites only – Make your website social – Long tail, no technical skills required – Copy and past javascript – Add OpenSocial applications • December 2008 General availability • February 2009 Social bar – Easier integration • March 2009 – Allow deep customized integration through outside of IFrame JS – Server side integration (REST API’s) 40
  • 41.
  • 42. Friend Connect - outside of the IFrame
  • 43. Friend Connect - outside of the IFrame http://www.ossamples.com/api/
  • 44. Friend Connect - outside of the IFrame
  • 45. Friend Connect - REST API
  • 46. OpenSocial - What’s ahead ? OpenSocial 0.9 and beyond
  • 49. Proxied Content <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Hello World!"> <Require feature="opensocial-0.9"/> </ModulePrefs> <Content view=”profile” type="html" href=”http://example.org/profile.php”> <os:ViewerRequest key="vwr"/> <os:OwnerRequest key="ownr"/> </Content> </Module>
  • 50. Lightweight JS - OSAPI osapi.people.getViewer({ fields: ['name', 'birthday'] }).execute(function(result) { alert('Your name is ' + result.name + '!'); alert('Your birthday is ' + result.birthday + '!'); });
  • 51. OSML tags • OpenSocial Markup Language • os:PeopleSelector • os:Name • os:Badge • os:Get <form action="/top_friends.php" method="POST"> Select your top 8 friends: <os:PeopleSelector group="${ViewerFriends}" multiple="true" max="8" inputName="top8" /> </form>
  • 52. OpenSocial Templating & Data-Pipelining ... <Require feature="opensocial-data" /> <Require feature="opensocial-templates"> ... <script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/markup"> <os:HttpRequest key="song" href="http://mysongserver.com"/ </script>   <script type="text/os-template"> <a href="${song.url}"> <img src="${song.albumThumbnail}"/> ${song.title} By ${song.artist} From ${song.album} </a> </script>
  • 53. And going to new places..
  • 54. Going to new places..
  • 55. Going to new places..
  • 56. Going to new places..
  • 57. Going to new places..
  • 59. Google I/O Social Videos Find them at: http://code.google.com/events/io/sessions.htm • Beyond Cut & Paste: Deep integrations with Google Friend Connect • Building a Business with Social Apps • Designing OpenSocial Apps for Speed and Scale • Google and the Social Web • Google Friend Connect Gadgets: Best Practices in Code and Interaction Design • Google Friend Connect In The Real World • Powering Mobile Apps with Social Data • The Social Web: An Implementor's Guide
  • 60. The Open & Social Web Q&A