Professional Documents
Culture Documents
Timothy Jordan
Developer Advocate, Google
buzz.timothyjordan.com
@timothyjordan
#devfest
Agenda
• Open Standards
• Google Buzz
• Examples
• Questions and Answers
Open Standards
...are a really good thing
Why?
Open Source
Open Source
Open Source
Open Source
Open Source
• Freedom
Open Source
• Freedom
• Community
Open Standards
Open Standards
• Simplify
Open Standards
• Simplify
• Interoperability
OAuth
Your Service
Application Get unauthorized Provider
request token
Your Service
Application Provider
Send user to SP
with token
Your Service
Application Get authorized Provider
request token
Your Service
Application Exchange request Provider
for access token
Your Service
Application Use access token Provider
to get data
Give
me your latest
content for feed
X, please.
Publisher Subscriber
I've delegated
distribution of that
content to this Hub.
Publisher Subscriber
I want to
subscribe to feed
X. Send updates to
this URL
I have new
content for feed
X for you!
Give me
your latest
content for feed
X, please.
Give me
your latest
content for feed
X, please.
New update
to feed X! Here
you go.
New update
to feed X! Here
you go.
I have a
new entry
Source Aggregator
PubSubHubbub
A new entry? I
will re-publish it
right away.
Source Aggregator
PubSubHubbub
I have a new
comment on that entry
from you!
Source Aggregator
Salmon
A new comment? I
will publish it in the
thread right away [*].
Source Aggregator
Salmon
I have a new
comment.
Aggregator
Aggregator
Source Aggregator
Aggregator
PubSubHubbub Aggregator
Aggregator
Aggregator
Thanks, we'll
re-publish this right
away.
Aggregator
Aggregator
Source Aggregator
Aggregator
PubSubHubbub Aggregator
Aggregator
Aggregator
Actor
Activity Streams
Actor
Verb
Activity Streams
Actor
Verb
Object
Activity Streams
Timothy
Posts
A Note
Activity Streams
Barack Obama
Started Following
Timothy Jordan
Activity Streams
Timothy Jordan
Started Following
Barack Obama
Activity Streams
Timothy Jordan
Bella Swan
Activity Streams
Timothy Jordan
Bella Swan
activitystrea.ms
Google Buzz API
Warning!
Activity Streams
Actor
Verb
Object
Timothy
Posts
A Note
"href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com,
2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?alt\u003djson",
"type": "json"
}
],
"replies": [
{
"href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",
"type": "application/json",
"count": 2,
"updated": "2010-05-09T02:53:13.730Z"
}
]
},
"actor": {
"id": "{id}",
"name": "Timothy Jordan",
"profileUrl": "{url}/captaintimothy",
"thumbnailUrl": "{url}/captaintimothy/thumb.jpg"
},
"verbs": [
"post"
],
"object": {
"type": "note",
"content": "content goes here",
"links": {
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
]
}
},
}
],
"replies": [
{
"href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",
"type": "application/json",
"count": 2,
"updated": "2010-05-09T02:53:13.730Z"
}
]
},
"actor": {
"id": "{id}",
"name": "Timothy Jordan",
"profileUrl": "{url}/captaintimothy",
"thumbnailUrl": "{url}/captaintimothy/thumb.jpg"
},
"verbs": [
"post"
],
"object": {
"type": "note",
"content": "content goes here",
"links": {
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
]
}
},
"source": {
"title": "Buzz"
},
"visibility": {
"entries": [
"type": "json"
}
],
"replies": [
{
"href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",
"type": "application/json",
"count": 2,
"updated": "2010-05-09T02:53:13.730Z"
}
]
},
"actor": {
"id": "{id}",
"name": "Timothy Jordan",
"profileUrl": "{url}/captaintimothy",
"thumbnailUrl": "{url}/captaintimothy/thumb.jpg"
},
"verbs": [
"post"
],
"object": {
"type": "note",
"content": "content goes here"
}
},
"source": {
"title": "Buzz"
},
"visibility": {
"entries": [
{
"id": "https://www.googleapis.com/buzz/v1/people/@me/@groups/@public?alt\u003djson",
"title": "Public"
}
]
}
}
{
"kind": "buzz#activity",
"title": "note to self",
"published": "2010-05-09T02:53:13.000Z",
"updated": "2010-05-09T02:53:13.730Z",
"id": "tag:google.com,2010:buzz:foo",
"links": {
"liked": [
{
"href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com,
2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4/@liked?alt\u003djson",
"type": "application/json",
"count": 0
}
],
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
],
"self": [
{
"href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com,
2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?alt\u003djson",
{
"kind": "buzz#activity",
"title": "note to self",
"published": "2010-05-09T02:53:13.000Z",
"updated": "2010-05-09T02:53:13.730Z",
"id": "tag:google.com,2010:buzz:foo",
"links": {
"liked": [
{
"href": "{url}/{userid}/@self/{commentId}/@liked?alt=json",
"type": "application/json",
"count": 4,
"updated": "2010-05-09T02:53:13.730Z"
}
],
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
],
"self": [
{
"href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com,
2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?alt\u003djson",
"type": "json"
],
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
],
"self": [
{
"href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com,
2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?alt\u003djson",
"type": "json"
}
],
"replies": [
{
"href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",
"type": "application/json",
"count": 2,
"updated": "2010-05-09T02:53:13.730Z"
}
]
},
"actor": {
"id": "110242419133439594545",
"name": "Timothy Jordan",
"profileUrl": "{url}/captaintimothy",
"thumbnailUrl": "{url}/captaintimothy/thumb.jpg"
},
"verbs": [
"post"
],
"object": {
"profileUrl": "{url}/chabotc",
"thumbnailUrl": "{url}/chabotc/thumb.jpg"
},
"verbs": [
"post"
],
"object": {
"type": "note",
"content": "content goes here",
"links": {
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
]
}
},
"source": {
"title": "Buzz"
},
"visibility": {
"entries": [
{
"id": "https://www.googleapis.com/buzz/v1/people/@me/@groups/@public?alt\u003djson",
"title": "Public"
}
]
}
}
"profileUrl": "{url}/chabotc",
"thumbnailUrl": "{url}/chabotc/thumb.jpg"
},
"verbs": [
"post"
],
"object": {
"type": "note",
"content": "content goes here",
"links": {
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
]
}
},
"source": {
"title": "Buzz"
},
"visibility": {
"entries": [
{
"id": "{url}/people/@me/@groups/@public?alt=json",
"title": "Public"
}
]
}
}
"content": "content goes here",
"links": {
"alternate": [
{
"href": "http://www.google.com/buzz/a/google.com",
"type": "text/html"
}
]
}
},
"source": {
"title": "Buzz"
},
"visibility": {
"entries": [
{
"id": "{url}/people/@me/@groups/@public?alt=json",
"title": "Public"
}
]
},
Gardenhose
Track
Examples
buzz-bingo.appspot.com
Sign-In & Auth for Buzz
client = buzz.Client()
client.build_oauth_consumer(
OAUTH_CONSUMER_KEY,
OAUTH_CONSUMER_SECRET
)
client.oauth_scopes.append(
buzz.FULL_ACCESS_SCOPE
)
Sign-In & Auth for Buzz
request_token = \
client.fetch_oauth_request_token(
'http://example.com/oauth/callback/'
)
# Save request token to the data store
authorization_url = \
client.build_oauth_authorization_url(
request_token
)
Sign-In & Auth for Buzz
verifier = request.get('oauth_verifier')
# Lookup request_token in data store
client.oauth_request_token = request_token
access_token = \
client.fetch_oauth_access_token(verifier)
# Save access token to the data store
Buzz Bingo is open source!
code.google.com/p/buzz-bingo
buzz-bingo.appspot.com
Track
Extras
Let’s Talk: Questions and Answers
Timothy Jordan
Developer Advocate, Google
buzz.timothyjordan.com
@timothyjordan
#devfest
Codelab
Time: 13:20 - 15:00
Location: Track B - 301
Links
https://code.google.com/apis/buzz/docs/
http://code.google.com/p/oacurl/
http://code.google.com/p/buzz-php-client/
http://code.google.com/p/buzz-python-client/
http://code.google.com/p/buzz-java-client/
code.google.com/p/buzz-codelabs
code.google.com/p/buzz-mood