SlideShare a Scribd company logo
1 of 21
Being sociable
Opensocial, Shindig, and Lonely Planet Groups

Julian Doherty, Senior Developer, Lonely Planet

     julian.doherty@lonelyplanet.com.au
           http://twitter.com/madlep
Opensocial
•   Platform to host 3rd party "Gadgets" on a site.
•   Open specification for how all the bits hang
    together
•   Developed by Google/MySpace originally
•   Kind of like Facebook applications (hopefully with
    fewer ninjas and pirates)
•   Cross platform and portable. Taking the "walls"
    away from the garden.... in theory...
Gadgets vs OpenSocial
        vs Wave
    OpenSocial gadgets are Google Gadgets
   Wave Extensions are also Google Gadgets
Some OpenSocial gadgets can be Wave Extensions
            (But not necessarily)
3rd Party Interactivity
• Containers handle security, persistence etc
• Gadget developers create apps for container
• Hopefully in original, and unexpected ways
Kinda open
• Gadgets are write once run anywhere...
  (heard that before)
• Each site has own needs and quirks
• Leads to compatibility issues
• Data still closed
Shindig
•   Java / PHP Reference implementation
•   Container only. No user/gadget housekeeping
•   Not production ready out of the box
•   But lots of extension points
•   Almost no documentation
Our Implementation
• Rails app for main site
  http://www.lonelyplanet.com/groups
• Shindig (Java running on Tomcat)
• Rails app exposes data web service:
  People/Activities/Data/OAuth credentials
• Shindig grabs data via HTTP from Rails app
So lets see some in action
Recommended Reading
Chat
Trippy (Wave extension)
Some code now
Opensocial Javascript API
 • People (Relationships, social network)
 • Activities (Who did what)
 • Data (Key/value pairs for person/app)
 • Web services (with OAuth)
Simplest thing that works

    <?xml version=”1.0” encoding=”UTF-8”?>
    <Module>
      <ModulePrefs title=”Hello World!”/>
      <Content type=”html”>
        <![CDATA[
          <h1>Hello World!</h1>
        ]]>
      </Content>
    </Module>
Social Graph
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);
}

function onLoadFriends(data) {
  var viewer = data.get('viewer').getData();
  var viewerFriends = data.get('viewerFriends').getData();
  //do cool with the results here...
}
Activity stream / wall posts
 function postActivity(user, thing) {
   var params = {};
   params[opensocial.Activity.Field.TITLE] =
     'YO, IMMA LET YOU FINISH, BUT ' + user +
     'HAS THE BEST ' + thing + ' EVER!';
   var activity = opensocial.newActivity(params);

     opensocial.requestCreateActivity(activity,
       opensocial.CreateActivityPriority.HIGH, function() {});
 }
Key/value pair data
function loadSomeData() {
  var req = opensocial.newDataRequest();
  var viewer = opensocial.newIdSpec({ "userId" : "VIEWER" });
  req.add(req.newFetchPersonAppDataRequest(viewer, 'key'), 'value');
  req.send(onLoadSomeData);
}




function writeSomeData() {
  var json = gadgets.json.stringify({“foo” : “bar”});
 
  var req = opensocial.newDataRequest();
  req.add(req.newUpdatePersonAppDataRequest("VIEWER", 'key', json));
  req.send(onWriteSomeData);
}
gadgets.io

function getRemoteData(url) {
  var params = {};
  params[gadgets.io.RequestParameters.CONTENT_TYPE] =
    gadgets.io.ContentType.JSON;
  gadgets.io.makeRequest(url, onRemoteData, params);
}
Awesomeness
• Creating first app was cool
• Whole apps as client side is powerful
• Great to allow 3rd parties to mix and mash
  things up this way
Lonely Planet / Govhack
       hack day
 • November 7th - 8th (THIS WEEKEND!)
 • See http://lplabs.com for details
More?
• http://code.google.com/apis/opensocial/
• http://incubator.apache.org/shindig/
• http://www.lonelyplanet.com/groups
• http://lplabs.com/groups
• Examples ripped from http://wiki.opensocial.org

More Related Content

Similar to Opensocial

The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009Chris Chabot
 
Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialPatrick Chanezon
 
Open Social Presentation - GSP West 2008
Open Social Presentation - GSP West 2008Open Social Presentation - GSP West 2008
Open Social Presentation - GSP West 2008Patrick Chanezon
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The EnterpriseTim Moore
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial IntroPamela Fox
 
Semantic Metastandards will Unlock IoT Interoperability
Semantic Metastandards will Unlock IoT InteroperabilitySemantic Metastandards will Unlock IoT Interoperability
Semantic Metastandards will Unlock IoT InteroperabilityDavid Janes
 
Barcamphanoi Opensocial Application Development
Barcamphanoi Opensocial Application DevelopmentBarcamphanoi Opensocial Application Development
Barcamphanoi Opensocial Application DevelopmentHoat Le
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)Jose Manuel Pereira Garcia
 
Shindig in 2 hours
Shindig in 2 hoursShindig in 2 hours
Shindig in 2 hourshanhvi
 
Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!Stacy Devino
 
Goodle Developer Days Munich 2008 - Open Social Update
Goodle Developer Days Munich 2008 - Open Social UpdateGoodle Developer Days Munich 2008 - Open Social Update
Goodle Developer Days Munich 2008 - Open Social UpdatePatrick Chanezon
 
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite Keiko Ogura
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsRichard Rodger
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
Building Tomorrow's Web Services
Building Tomorrow's Web ServicesBuilding Tomorrow's Web Services
Building Tomorrow's Web ServicesPat Cappelaere
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 

Similar to Opensocial (20)

The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009
 
Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocial
 
Open Social Presentation - GSP West 2008
Open Social Presentation - GSP West 2008Open Social Presentation - GSP West 2008
Open Social Presentation - GSP West 2008
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
Semantic Metastandards will Unlock IoT Interoperability
Semantic Metastandards will Unlock IoT InteroperabilitySemantic Metastandards will Unlock IoT Interoperability
Semantic Metastandards will Unlock IoT Interoperability
 
Barcamphanoi Opensocial Application Development
Barcamphanoi Opensocial Application DevelopmentBarcamphanoi Opensocial Application Development
Barcamphanoi Opensocial Application Development
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
Shindig in 2 hours
Shindig in 2 hoursShindig in 2 hours
Shindig in 2 hours
 
Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!
 
Goodle Developer Days Munich 2008 - Open Social Update
Goodle Developer Days Munich 2008 - Open Social UpdateGoodle Developer Days Munich 2008 - Open Social Update
Goodle Developer Days Munich 2008 - Open Social Update
 
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Mini curso Android
Mini curso AndroidMini curso Android
Mini curso Android
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.js
 
20120816 nodejsdublin
20120816 nodejsdublin20120816 nodejsdublin
20120816 nodejsdublin
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
Hi5 Open Social
Hi5   Open SocialHi5   Open Social
Hi5 Open Social
 
Building Tomorrow's Web Services
Building Tomorrow's Web ServicesBuilding Tomorrow's Web Services
Building Tomorrow's Web Services
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 

Recently uploaded

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 Takeoffsammart93
 
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 BrazilV3cube
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 textsMaria Levchenko
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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...Martijn de Jong
 
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 BusinessPixlogix Infotech
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[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.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Opensocial

  • 1. Being sociable Opensocial, Shindig, and Lonely Planet Groups Julian Doherty, Senior Developer, Lonely Planet julian.doherty@lonelyplanet.com.au http://twitter.com/madlep
  • 2. Opensocial • Platform to host 3rd party "Gadgets" on a site. • Open specification for how all the bits hang together • Developed by Google/MySpace originally • Kind of like Facebook applications (hopefully with fewer ninjas and pirates) • Cross platform and portable. Taking the "walls" away from the garden.... in theory...
  • 3. Gadgets vs OpenSocial vs Wave OpenSocial gadgets are Google Gadgets Wave Extensions are also Google Gadgets Some OpenSocial gadgets can be Wave Extensions (But not necessarily)
  • 4. 3rd Party Interactivity • Containers handle security, persistence etc • Gadget developers create apps for container • Hopefully in original, and unexpected ways
  • 5. Kinda open • Gadgets are write once run anywhere... (heard that before) • Each site has own needs and quirks • Leads to compatibility issues • Data still closed
  • 6. Shindig • Java / PHP Reference implementation • Container only. No user/gadget housekeeping • Not production ready out of the box • But lots of extension points • Almost no documentation
  • 7. Our Implementation • Rails app for main site http://www.lonelyplanet.com/groups • Shindig (Java running on Tomcat) • Rails app exposes data web service: People/Activities/Data/OAuth credentials • Shindig grabs data via HTTP from Rails app
  • 8. So lets see some in action
  • 10. Chat
  • 13. Opensocial Javascript API • People (Relationships, social network) • Activities (Who did what) • Data (Key/value pairs for person/app) • Web services (with OAuth)
  • 14. Simplest thing that works <?xml version=”1.0” encoding=”UTF-8”?> <Module> <ModulePrefs title=”Hello World!”/> <Content type=”html”> <![CDATA[ <h1>Hello World!</h1> ]]> </Content> </Module>
  • 15. Social Graph 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); } function onLoadFriends(data) { var viewer = data.get('viewer').getData(); var viewerFriends = data.get('viewerFriends').getData(); //do cool with the results here... }
  • 16. Activity stream / wall posts function postActivity(user, thing) { var params = {}; params[opensocial.Activity.Field.TITLE] = 'YO, IMMA LET YOU FINISH, BUT ' + user + 'HAS THE BEST ' + thing + ' EVER!'; var activity = opensocial.newActivity(params); opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority.HIGH, function() {}); }
  • 17. Key/value pair data function loadSomeData() { var req = opensocial.newDataRequest(); var viewer = opensocial.newIdSpec({ "userId" : "VIEWER" }); req.add(req.newFetchPersonAppDataRequest(viewer, 'key'), 'value'); req.send(onLoadSomeData); } function writeSomeData() { var json = gadgets.json.stringify({“foo” : “bar”});   var req = opensocial.newDataRequest(); req.add(req.newUpdatePersonAppDataRequest("VIEWER", 'key', json)); req.send(onWriteSomeData); }
  • 18. gadgets.io function getRemoteData(url) { var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON; gadgets.io.makeRequest(url, onRemoteData, params); }
  • 19. Awesomeness • Creating first app was cool • Whole apps as client side is powerful • Great to allow 3rd parties to mix and mash things up this way
  • 20. Lonely Planet / Govhack hack day • November 7th - 8th (THIS WEEKEND!) • See http://lplabs.com for details
  • 21. More? • http://code.google.com/apis/opensocial/ • http://incubator.apache.org/shindig/ • http://www.lonelyplanet.com/groups • http://lplabs.com/groups • Examples ripped from http://wiki.opensocial.org