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
Let’s 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?

More Related Content

PPTX
Android App Development using HTML5 Technology
PDF
Android Jetpack - Google IO Extended Singapore 2018
PDF
Introduction to Android M
PPTX
Introduction to Firebase [Google I/O Extended Bangkok 2016]
PDF
React Native: React Meetup 3
PPT
Introduction to Vaadin
PPTX
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
PPTX
04 objective-c session 4
Android App Development using HTML5 Technology
Android Jetpack - Google IO Extended Singapore 2018
Introduction to Android M
Introduction to Firebase [Google I/O Extended Bangkok 2016]
React Native: React Meetup 3
Introduction to Vaadin
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
04 objective-c session 4

What's hot (20)

PDF
Firebase Basics - Dialog Demo for Group Tech Staff
PPT
Js frameworks
PDF
Intro firebase
PDF
Android Jetpack
PPTX
Introduction to AngularJS Framework
PDF
Introducing Firebase by Google
PDF
Google Cloud Enpoints
PPTX
Phonegap for Android
PPTX
Industrial Training in PhoneGap Application
PDF
iOS App Using cordova
PPTX
React Native
PPTX
Timings API: Performance Assertion during the functional testing
PDF
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
PPTX
SgCodeJam24 Workshop
PDF
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
PDF
Node.js Crash Course (Jump Start)
PPTX
Meteor Introduction - Ashish
PDF
The Glass Class - Tutorial 2 - Mirror API
PPTX
Android CI and Appium
PDF
Hybrid App using WordPress
Firebase Basics - Dialog Demo for Group Tech Staff
Js frameworks
Intro firebase
Android Jetpack
Introduction to AngularJS Framework
Introducing Firebase by Google
Google Cloud Enpoints
Phonegap for Android
Industrial Training in PhoneGap Application
iOS App Using cordova
React Native
Timings API: Performance Assertion during the functional testing
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi An...
SgCodeJam24 Workshop
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
Node.js Crash Course (Jump Start)
Meteor Introduction - Ashish
The Glass Class - Tutorial 2 - Mirror API
Android CI and Appium
Hybrid App using WordPress
Ad

Similar to Google+ API (2012) (20)

PDF
The Big Picture and How to Get Started
PPTX
SSO with Social Login Integration & FastAPI Simplified
PDF
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
PDF
google drive and the google drive sdk
PDF
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
PDF
Exploring Google (Cloud) APIs with Python & JavaScript
PPTX
Android dev toolbox
PDF
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
PDF
Getting started using Google APIs (2019)
PDF
Google Integration in Android Apps - Mooscon 2013 Cebit
PPTX
Open Hack NYC Yahoo Social SDKs
PDF
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
PPTX
Google Apps Script: The authentic{ated} playground [2015 Ed.]
PDF
Programming IoT Gateways in JavaScript with macchina.io
PDF
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
PDF
Android chat in the cloud
PDF
Using Google (Cloud) APIs
KEY
Introduction to Google Apps Platform
PDF
OAuth 2.0
PDF
Nk API - examples
The Big Picture and How to Get Started
SSO with Social Login Integration & FastAPI Simplified
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
google drive and the google drive sdk
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Exploring Google (Cloud) APIs with Python & JavaScript
Android dev toolbox
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Getting started using Google APIs (2019)
Google Integration in Android Apps - Mooscon 2013 Cebit
Open Hack NYC Yahoo Social SDKs
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Google Apps Script: The authentic{ated} playground [2015 Ed.]
Programming IoT Gateways in JavaScript with macchina.io
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Android chat in the cloud
Using Google (Cloud) APIs
Introduction to Google Apps Platform
OAuth 2.0
Nk API - examples
Ad

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
The various Industrial Revolutions .pptx
PPT
Geologic Time for studying geology for geologist
PPT
What is a Computer? Input Devices /output devices
PPTX
Tartificialntelligence_presentation.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Architecture types and enterprise applications.pdf
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
CloudStack 4.21: First Look Webinar slides
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Benefits of Physical activity for teenagers.pptx
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Zenith AI: Advanced Artificial Intelligence
The various Industrial Revolutions .pptx
Geologic Time for studying geology for geologist
What is a Computer? Input Devices /output devices
Tartificialntelligence_presentation.pptx
1 - Historical Antecedents, Social Consideration.pdf
WOOl fibre morphology and structure.pdf for textiles
Group 1 Presentation -Planning and Decision Making .pptx
A review of recent deep learning applications in wood surface defect identifi...
Architecture types and enterprise applications.pdf
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
observCloud-Native Containerability and monitoring.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
CloudStack 4.21: First Look Webinar slides
A contest of sentiment analysis: k-nearest neighbor versus neural network
Benefits of Physical activity for teenagers.pptx
Final SEM Unit 1 for mit wpu at pune .pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf

Google+ API (2012)

  • 1. Google+ API #GDG #DevFestJkt #DevFest #2012 Oon Arfiandwi <[email protected]> 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 Let’s 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?