@adewalebuzz.google.com/adewale
Exploring Google’s   Social APIs
Why develop on Google Buzz?
4
5
7
Screenshots from: http://www.go-buzz.com/8
Why do you care?9
Using the Google Buzz API                            10
Passwords are bad for everyone
OAuth          Your                           Service        Application   Get unauthorized   Provider                    ...
OAuth          Your                           Service        Application                      Provider                    ...
OAuth          Your                           Service        Application   Get authorized     Provider                    ...
OAuth          Your                           Service        Application   Exchange request   Provider                    ...
OAuth          Your                           Service        Application   Use access token   Provider                    ...
Auth url:   https://www.google.com/buzz/api/auth/OAuthAuthorizeTokenscope:      https://www.googleapis.com/auth/buzzdomain...
https://www.google.com/buzz/api/auth/OAuthAuthorizeToken?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbuzz&domain=www.e...
Polling is bad for everyone
code.google.com/p/pubsubhubbub
PubSubHubbub     Publisher   Hub   Subscriber
PubSubHubbub                                 Give                             me your latest                            co...
PubSubHubbub                      Ive delegated                    distribution of that                   content to this ...
PubSubHubbub                                 I want to                             subscribe to feed                      ...
PubSubHubbub                             Hey there! Did                           you really send this                    ...
PubSubHubbub                                Yup, that was                            really me, not a DoS                 ...
PubSubHubbub                    I have new                  content for feed                    X for you!      Publisher ...
PubSubHubbub                     Give me                    your latest                  content for feed                 ...
PubSubHubbub                  Here you go.      Publisher                  Hub   Subscriber 4. a) Publisher notifies Hub a...
PubSubHubbub                     Give me                    your latest                  content for feed                 ...
PubSubHubbub                  Here you go.      Publisher                  Hub        Subscriber 4. b) If the Publisher do...
PubSubHubbub                                 New update                               to feed X! Here                     ...
PubSubHubbub                                  New update                                to feed X! Here                   ...
PubSubHubbub
Firehose
Photo credit: Nandhp, used under the Creative Commons Attribution-Share Alike 3.0 Unported license.Gardenhose
Track
http://buzzchatbot.com
Linkshttps://code.google.com/apis/buzz/docs/http://code.google.com/p/google-api-php-client/http://code.google.com/p/google...
Making your products better
Log-in with Google Find your friends
Drive traffic with Share to Buzz button
Showcase relevant conversations in realtime
Questions?...and answers
Exploring Google's Social APIs
Exploring Google's Social APIs
Exploring Google's Social APIs
Exploring Google's Social APIs
Exploring Google's Social APIs
Exploring Google's Social APIs
Exploring Google's Social APIs
Upcoming SlideShare
Loading in …5
×

Exploring Google's Social APIs

942 views

Published on

My presentation from the Google Developer Days in Munich, Moscow and Prague.

An exploration of the Google Buzz APIs.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
942
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • -Protocol, Secure API auth\n-Simple and standard\n-Desktop and web\n-Limit the access scope\n\nno:\n-OAuth, the valet key of authentication\n
  • -Protocol, Secure API auth\n-Simple and standard\n-Desktop and web\n-Limit the access scope\n\nno:\n-OAuth, the valet key of authentication\n
  •   OAUTH_CONSUMER_KEY,\n  OAUTH_CONSUMER_SECRET,\n  buzz.FULL_ACCESS_SCOPE\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • PubSubHubbub, real-time data syndication\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • -PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
  • The future is distributed: There will be big hubs, many small hubs, and tons of publishers and subscribers. Publishers, subscribers, and hubs may play multiple roles.\n
  • \n
  • \n
  • Photo: http://www.nps.gov/dena/bear-safety.htm\n(US Government photo)\n
  • Photo: http://www.nps.gov/dena/bear-safety.htm\n(US Government photo)\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Exploring Google's Social APIs

    1. 1. @adewalebuzz.google.com/adewale
    2. 2. Exploring Google’s Social APIs
    3. 3. Why develop on Google Buzz?
    4. 4. 4
    5. 5. 5
    6. 6. 7
    7. 7. Screenshots from: http://www.go-buzz.com/8
    8. 8. Why do you care?9
    9. 9. Using the Google Buzz API 10
    10. 10. Passwords are bad for everyone
    11. 11. OAuth Your Service Application Get unauthorized Provider request token 1. Your application gets an unauthorized request token from the Service Provider’s authorization server.
    12. 12. OAuth Your Service Application Provider Send user to SP with token 2. Your application sends the user to the Service Provider, which asks the user to grant your application access to the required data.
    13. 13. OAuth Your Service Application Get authorized Provider request token 3. Your application gets an authorized request token from the authorization server.
    14. 14. OAuth Your Service Application Exchange request Provider for access token 4. You exchange the authorized request token for an access token.
    15. 15. OAuth Your Service Application Use access token Provider to get data 5. You use the access token to request data from Service Provider’s service access servers.
    16. 16. Auth url: https://www.google.com/buzz/api/auth/OAuthAuthorizeTokenscope: https://www.googleapis.com/auth/buzzdomain: www.example.orgiconUrl: http://www.example.org/icon.png
    17. 17. https://www.google.com/buzz/api/auth/OAuthAuthorizeToken?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbuzz&domain=www.example.org&oauth_token=
    18. 18. Polling is bad for everyone
    19. 19. code.google.com/p/pubsubhubbub
    20. 20. PubSubHubbub Publisher Hub Subscriber
    21. 21. PubSubHubbub Give me your latest content for feed X, please. Publisher Subscriber 1. Subscriber gets Publisher’s feed. The feed contains a link to the Hub.
    22. 22. PubSubHubbub Ive delegated distribution of that content to this Hub. Publisher Subscriber 1. Subscriber gets Publisher’s feed. The feed contains a link to the Hub.
    23. 23. PubSubHubbub I want to subscribe to feed X. Send updates to this URL Publisher Hub Subscriber 2. Subscriber POSTs subscription request to the Hub. The request contains the URL where the Hub should POST new updates to the Subscriber.
    24. 24. PubSubHubbub Hey there! Did you really send this request? Publisher Hub Subscriber 3. Hub hits the URL to verify the request was authentic; Subscriber responds with confirmation to the Hub.
    25. 25. PubSubHubbub Yup, that was really me, not a DoS attacker. Publisher Hub Subscriber 3. Hub hits the URL to verify the request was authentic; Subscriber responds with confirmation to the Hub.
    26. 26. PubSubHubbub I have new content for feed X for you! Publisher Hub Subscriber 4. a) Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries.
    27. 27. PubSubHubbub Give me your latest content for feed X, please. Publisher Hub Subscriber 4. a) Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries.
    28. 28. PubSubHubbub Here you go. Publisher Hub Subscriber 4. a) Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries.
    29. 29. PubSubHubbub Give me your latest content for feed X, please. Publisher Hub Subscriber 4. b) If the Publisher does not inform the Hub, the Hub will periodically poll the Publisher’s feed for new updates.
    30. 30. PubSubHubbub Here you go. Publisher Hub Subscriber 4. b) If the Publisher does not inform the Hub, the Hub will periodically poll the Publisher’s feed for new updates.
    31. 31. PubSubHubbub New update to feed X! Here you go. Publisher Hub Subscriber 5. When Hub receives new update to feed X, it POSTs the update to the Subscriber’s endpoint URL.
    32. 32. PubSubHubbub New update to feed X! Here you go. Publisher Hub Subscriber Subscriber Subscriber Subscriber Subscriber Subscriber 6. If feed X has multiple subscribers, the Hub sends updates to all of them. This reduces load on the Publisher.
    33. 33. PubSubHubbub
    34. 34. Firehose
    35. 35. Photo credit: Nandhp, used under the Creative Commons Attribution-Share Alike 3.0 Unported license.Gardenhose
    36. 36. Track
    37. 37. http://buzzchatbot.com
    38. 38. Linkshttps://code.google.com/apis/buzz/docs/http://code.google.com/p/google-api-php-client/http://code.google.com/p/google-api-python-client/http://code.google.com/p/google-api-java-client/http://code.google.com/p/google-api-ruby-clienthttp://code.google.com/p/buzz-codelabshttp://code.google.com/p/buzz-mood
    39. 39. Making your products better
    40. 40. Log-in with Google Find your friends
    41. 41. Drive traffic with Share to Buzz button
    42. 42. Showcase relevant conversations in realtime
    43. 43. Questions?...and answers

    ×