際際滷

際際滷Share a Scribd company logo
Google+ API
#GDG #DevFestJkt #DevFest #2012
Oon Arfiandwi <oon@7langit.com>
Manager of Google Developer Group Jakarta
http://gplus.to/oonid
so, what can be covered
in 35 mins?
Google+ API in general
OAuth2.0 + REST API
Sign in with Google+, get to know about
People, Activities & Comments
Lets code in Android + Google Play Services
Google+ History
Google+ API
http://developers.google.com/+
Plugins for your website + REST API
Mobile Platform (Android, iOS, mobile web)
Hangout API
History API (developer preview)
OAuth 2.0
Generate OAuth 2.0 Token
via Google Play Services
GoogleAuthUtil.getToken()
via Google APIs Client Library for Java
create API Project with Google APIs Console
open browser to URL from GoogleAuthorizationCodeRequestURL
get Token via execute GoogleAuthorizationCodeTokenRequest
Activate Service:
Google+ API
Google+ History API
Create:
OAuth 2.0 client ID
Google APIs Console
String googleAuthorizationCodeRequestUrl = new GoogleAuthorizationCodeRequestUrl(
	 	 ShrdPrfsStore.CLIENT_ID,ShrdPrfsStore.REDIRECT_URI,ShrdPrfsStore.SCOPE).build();
	
	webview.setWebViewClient(new WebViewClient() {
		 @Override
		 public void onPageFinished(WebView view, String url) {
		 	 if (url.startsWith(SharedPrefsStore.REDIRECT_URI)) {
	 	 	 	 try {
	 	 	 	 	 if (url.indexOf("code=") != -1) {
	 	 	 	 	 	 // Url is like http://localhost/?code=4/Z5DgC1IxNL-muPsrE2Sjy9zQn2pF
	 	 	 	 	 	 String code = url.substring...
	 	 	 	 	 	 TokenResponse accessTokenResponse =
new GoogleAuthorizationCodeTokenRequest(
	 	 	 	 	 	 	 new NetHttpTransport(), new JacksonFactory(),
	 	 	 	 	 	 	 ShrdPrfsStore.CLIENT_ID, ShrdPrfsStore.CLIENT_SECRET,
	 	 	 	 	 	 	 code, ShrdPrfsStore.REDIRECT_URI).execute();
	 	 	 	 	 	 ...
	 	 	 	 	 	 credentialStore.write(accessTokenResponse);
	 	 	 	 	 	 ...
	 	 	 	 	 }
	 	 	 	 } catch (IOException e) {}
	 	 	 }
		 };
	});
	webview.loadUrl(googleAuthorizationCodeRequestUrl);
OAuth 2.0 login with
Google+ Account
Registered Product Name:
DevFestJktPro
SCOPE:
plus.me
plus.moment.write
Public
A
ctivities
Access Google+ Activities
using OAuth access token
as GoogleCredential
Filter the Google+
Activities by user and
collections (eg: public)
Create Simple ListView
based on Google+ Activity
Titles
Google+ History API
http://developers.google.com/+/history/preview/
Google+ history is a collection of moments that
describe activities the user has engaged across the web
and apps.
Google+ history API privately save moments, users can
share those moments with others.
Moments in History
Types of Moments
AddActivity
BuyActivity
CheckInActivity
ListenActivity
ReviewActivity ...
Moments target URL
must include
attribute from
schema.org markup
Request new type of
Moments?
G
oogle+
H
istory
Google+ History preview
user interface, available for
registered developer
History of CheckInActivity
History of AddActivity (+1)
Google+ API
The end
or is it the beginning?
(quote from G+ History)
Questions?
Ad

Recommended

Android App Development using HTML5 Technology
Android App Development using HTML5 Technology
Oon Arfiandwi
Android Jetpack - Google IO Extended Singapore 2018
Android Jetpack - Google IO Extended Singapore 2018
Hassan Abid
Introduction to Android M
Introduction to Android M
amsanjeev
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Sittiphol Phanvilai
React Native: React Meetup 3
React Native: React Meetup 3
Rob Gietema
Introduction to Vaadin
Introduction to Vaadin
Jeroen Benats
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
Codemotion Tel Aviv
04 objective-c session 4
04 objective-c session 4
Amr Elghadban (AmrAngry)
Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech Staff
Tharaka Devinda
Js frameworks
Js frameworks
ParagKhalas
Intro firebase
Intro firebase
Mandy Pao
Android Jetpack
Android Jetpack
Tudor Sirbu
Introduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
Introducing Firebase by Google
Introducing Firebase by Google
Algiers Tech Meetup
Google Cloud Enpoints
Google Cloud Enpoints
Mattia Gasperotti
Phonegap for Android
Phonegap for Android
Muthu Kumar
Industrial Training in PhoneGap Application
Industrial Training in PhoneGap Application
Arcadian Learning
iOS App Using cordova
iOS App Using cordova
Mitosis Technology
React Native
React Native
Fatih imek
Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
PetrosPlakogiannis
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
DicodingEvent
SgCodeJam24 Workshop
SgCodeJam24 Workshop
remko caprio
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
DicodingEvent
Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start)
Haim Michael
Meteor Introduction - Ashish
Meteor Introduction - Ashish
Entrepreneur / Startup
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
Gun Lee
Android CI and Appium
Android CI and Appium
Oren Ashkenazy
Hybrid App using WordPress
Hybrid App using WordPress
Haim Michael
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
traactivity
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
Lakhdar Meftah

More Related Content

What's hot (20)

Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech Staff
Tharaka Devinda
Js frameworks
Js frameworks
ParagKhalas
Intro firebase
Intro firebase
Mandy Pao
Android Jetpack
Android Jetpack
Tudor Sirbu
Introduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
Introducing Firebase by Google
Introducing Firebase by Google
Algiers Tech Meetup
Google Cloud Enpoints
Google Cloud Enpoints
Mattia Gasperotti
Phonegap for Android
Phonegap for Android
Muthu Kumar
Industrial Training in PhoneGap Application
Industrial Training in PhoneGap Application
Arcadian Learning
iOS App Using cordova
iOS App Using cordova
Mitosis Technology
React Native
React Native
Fatih imek
Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
PetrosPlakogiannis
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
DicodingEvent
SgCodeJam24 Workshop
SgCodeJam24 Workshop
remko caprio
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
DicodingEvent
Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start)
Haim Michael
Meteor Introduction - Ashish
Meteor Introduction - Ashish
Entrepreneur / Startup
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
Gun Lee
Android CI and Appium
Android CI and Appium
Oren Ashkenazy
Hybrid App using WordPress
Hybrid App using WordPress
Haim Michael
Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech Staff
Tharaka Devinda
Js frameworks
Js frameworks
ParagKhalas
Intro firebase
Intro firebase
Mandy Pao
Android Jetpack
Android Jetpack
Tudor Sirbu
Introduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
Introducing Firebase by Google
Introducing Firebase by Google
Algiers Tech Meetup
Phonegap for Android
Phonegap for Android
Muthu Kumar
Industrial Training in PhoneGap Application
Industrial Training in PhoneGap Application
Arcadian Learning
React Native
React Native
Fatih imek
Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
PetrosPlakogiannis
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
DicodingEvent
SgCodeJam24 Workshop
SgCodeJam24 Workshop
remko caprio
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
DicodingEvent
Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start)
Haim Michael
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
Gun Lee
Android CI and Appium
Android CI and Appium
Oren Ashkenazy
Hybrid App using WordPress
Hybrid App using WordPress
Haim Michael

Similar to Google+ API (2012) (16)

Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
traactivity
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
Lakhdar Meftah
Google+ Login - A Primer
Google+ Login - A Primer
Tom Opgenorth
Mooscon 2013 cebit - google integration in android apps (1)
Mooscon 2013 cebit - google integration in android apps (1)
Heinrich Seeger
Google+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and Android
Peter Friese
Google Integration in Android Apps - Mooscon 2013 Cebit
Google Integration in Android Apps - Mooscon 2013 Cebit
Friedger M端ffke
What is Google+ History?
What is Google+ History?
Black Box Social Media
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
Peter Friese
Google+ and the Google+ Platform
Google+ and the Google+ Platform
Jomar Tigcal
CIS13: Identity Tech Overview: Less Pain, More Gain
CIS13: Identity Tech Overview: Less Pain, More Gain
CloudIDSummit
Android & Google Plus
Android & Google Plus
iMellon
google drive and the google drive sdk
google drive and the google drive sdk
firenze-gtug
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
Mathias Seguy
2011 august-gdd-mexico-city-rest-json-oauth
2011 august-gdd-mexico-city-rest-json-oauth
ikailan
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Alberto Ruibal
OAuth 2.0
OAuth 2.0
marcwan
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
traactivity
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
Lakhdar Meftah
Google+ Login - A Primer
Google+ Login - A Primer
Tom Opgenorth
Mooscon 2013 cebit - google integration in android apps (1)
Mooscon 2013 cebit - google integration in android apps (1)
Heinrich Seeger
Google+ for Mobile Apps on iOS and Android
Google+ for Mobile Apps on iOS and Android
Peter Friese
Google Integration in Android Apps - Mooscon 2013 Cebit
Google Integration in Android Apps - Mooscon 2013 Cebit
Friedger M端ffke
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
Peter Friese
Google+ and the Google+ Platform
Google+ and the Google+ Platform
Jomar Tigcal
CIS13: Identity Tech Overview: Less Pain, More Gain
CIS13: Identity Tech Overview: Less Pain, More Gain
CloudIDSummit
Android & Google Plus
Android & Google Plus
iMellon
google drive and the google drive sdk
google drive and the google drive sdk
firenze-gtug
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
Mathias Seguy
2011 august-gdd-mexico-city-rest-json-oauth
2011 august-gdd-mexico-city-rest-json-oauth
ikailan
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Alberto Ruibal
OAuth 2.0
OAuth 2.0
marcwan
Ad

Recently uploaded (20)

SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
Precisely
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
Addressing Evolving AI Model Challenges Through Memory and Storage, a Prese...
Addressing Evolving AI Model Challenges Through Memory and Storage, a Prese...
Edge AI and Vision Alliance
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
Down the Rabbit Hole Solving 5 Training Roadblocks
Down the Rabbit Hole Solving 5 Training Roadblocks
Rustici Software
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
Precisely
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
Addressing Evolving AI Model Challenges Through Memory and Storage, a Prese...
Addressing Evolving AI Model Challenges Through Memory and Storage, a Prese...
Edge AI and Vision Alliance
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
Down the Rabbit Hole Solving 5 Training Roadblocks
Down the Rabbit Hole Solving 5 Training Roadblocks
Rustici Software
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
Ad

Google+ API (2012)

  • 1. Google+ API #GDG #DevFestJkt #DevFest #2012 Oon Arfiandwi <oon@7langit.com> Manager of Google Developer Group Jakarta http://gplus.to/oonid
  • 2. so, what can be covered in 35 mins? Google+ API in general OAuth2.0 + REST API Sign in with Google+, get to know about People, Activities & Comments Lets code in Android + Google Play Services Google+ History
  • 3. Google+ API http://developers.google.com/+ Plugins for your website + REST API Mobile Platform (Android, iOS, mobile web) Hangout API History API (developer preview)
  • 4. OAuth 2.0 Generate OAuth 2.0 Token via Google Play Services GoogleAuthUtil.getToken() via Google APIs Client Library for Java create API Project with Google APIs Console open browser to URL from GoogleAuthorizationCodeRequestURL get Token via execute GoogleAuthorizationCodeTokenRequest
  • 5. Activate Service: Google+ API Google+ History API Create: OAuth 2.0 client ID Google APIs Console
  • 6. String googleAuthorizationCodeRequestUrl = new GoogleAuthorizationCodeRequestUrl( ShrdPrfsStore.CLIENT_ID,ShrdPrfsStore.REDIRECT_URI,ShrdPrfsStore.SCOPE).build(); webview.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { if (url.startsWith(SharedPrefsStore.REDIRECT_URI)) { try { if (url.indexOf("code=") != -1) { // Url is like http://localhost/?code=4/Z5DgC1IxNL-muPsrE2Sjy9zQn2pF String code = url.substring... TokenResponse accessTokenResponse = new GoogleAuthorizationCodeTokenRequest( new NetHttpTransport(), new JacksonFactory(), ShrdPrfsStore.CLIENT_ID, ShrdPrfsStore.CLIENT_SECRET, code, ShrdPrfsStore.REDIRECT_URI).execute(); ... credentialStore.write(accessTokenResponse); ... } } catch (IOException e) {} } }; }); webview.loadUrl(googleAuthorizationCodeRequestUrl);
  • 7. OAuth 2.0 login with Google+ Account Registered Product Name: DevFestJktPro SCOPE: plus.me plus.moment.write
  • 8. Public A ctivities Access Google+ Activities using OAuth access token as GoogleCredential Filter the Google+ Activities by user and collections (eg: public) Create Simple ListView based on Google+ Activity Titles
  • 9. Google+ History API http://developers.google.com/+/history/preview/ Google+ history is a collection of moments that describe activities the user has engaged across the web and apps. Google+ history API privately save moments, users can share those moments with others.
  • 10. Moments in History Types of Moments AddActivity BuyActivity CheckInActivity ListenActivity ReviewActivity ... Moments target URL must include attribute from schema.org markup Request new type of Moments?
  • 11. G oogle+ H istory Google+ History preview user interface, available for registered developer History of CheckInActivity History of AddActivity (+1)
  • 12. Google+ API The end or is it the beginning? (quote from G+ History) Questions?