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

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Recently uploaded (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

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