Developer DayGoogle 2010
The New Social Web:
It’s about Open Standards
Timothy Jordan
Developer DayGoogle 2010
Developer DayGoogle 2010
Timothy Jordan
Developer Advocate, Google
buzz.timothyjordan.com
@timothyjordan
Hello
Developer DayGoogle 2010
#gdd2010jp
Developer DayGoogle 2010
Agenda
• Open Standards
• Google Buzz
• Examples
Open Standards
...are a really good thing
Developer DayGoogle 2010
Why?
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
• Freedom
Developer DayGoogle 2010
Open Source
• Freedom
• Community
Developer DayGoogle 2010
Open Standards
Developer DayGoogle 2010
Open Standards
• Simplify
Developer DayGoogle 2010
Open Standards
• Simplify
• Interoperability
Developer DayGoogle 2010
Developer DayGoogle 2010
OAuth
1.Your application gets an unauthorized request token
from the Service Provider’s authorization server.
Your
Application
Service
ProviderGet unauthorized
request token
Developer DayGoogle 2010
OAuth
Your
Application
Service
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.
Developer DayGoogle 2010
OAuth
Your
Application
Service
ProviderGet authorized
request token
3.Your application gets an authorized request token
from the authorization server.
Developer DayGoogle 2010
OAuth
Your
Application
Service
ProviderExchange request
for access token
4.You exchange the authorized request token for an
access token.
Developer DayGoogle 2010
OAuth
Your
Application
Service
ProviderUse access token
to get data
5.You use the access token to request data from
Service Provider’s service access servers.
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemconten
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
feedburner/ext/1.0" gd:etag="W/&quot;CkUGRHk8fyp7ImA9Wx5WEU0.&quot;">
<id>tag:blogger.com,1999:blog-3188762512334365442</id>
<updated>2010-09-21T13:17:05.777-07:00</updated>
<title>Social Web Blog</title>
<subtitle type="html" />
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://googlesoc
<link rel="alternate" type="text/html" href="http://googlesocialweb.blogspot.com/" />
<link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654
<author>
<name>A Googler</name>
<email>noreply@blogger.com</email>
</author>
<generator version="7.00" uri="http://www.blogger.com">Blogger</generator>
<openSearch:totalResults>45</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" hr
<feedburner:info uri="socialwebblog" />
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.app
<entry gd:etag="W/&quot;D0YASX89cCp7ImA9WxFaFUo.&quot;">
<id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id>
<published>2010-07-19T14:14:00.001-07:00</published>
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:blogger.com,1999:blog-3188762512334365442</id>
<updated>2010-09-21T13:17:05.777-07:00</updated>
<title>Social Web Blog</title>
<author>
<name>A Googler</name>
<email>noreply@blogger.com</email>
</author>
<generator version="7.00" uri="http://www.blogger.com">Blogger</generator>
<link rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SocialWebBlog" />
<entry>
<id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id>
<published>2010-07-19T14:14:00.001-07:00</published>
<updated>2010-07-19T14:32:28.168-07:00</updated>
<title>Announcing New Google Buzz API features</title>
<content type="html"> ... </content>
<link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654
<author>
<name>Timothy Jordan</name>
<uri>http://www.blogger.com/profile/14618592793335366108</uri>
<email>noreply@blogger.com</email>
<gd:extendedProperty name="OpenSocialUserId" value="14459911890912057787" />
</author>
<thr:total>7</thr:total>
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:blogger.com,1999:blog-3188762512334365442</id>
<updated>2010-09-21T13:17:05.777-07:00</updated>
<title>Social Web Blog</title>
<author>
<name>A Googler</name>
<email>noreply@blogger.com</email>
</author>
<generator version="7.00" uri="http://www.blogger.com">Blogger</generator>
<link rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SocialWebBlog" />
<entry>
<id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id>
<published>2010-07-19T14:14:00.001-07:00</published>
<updated>2010-07-19T14:32:28.168-07:00</updated>
<title>Announcing New Google Buzz API features</title>
<content type="html"> ... </content>
<link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654
<author>
<name>Timothy Jordan</name>
<uri>http://www.blogger.com/profile/14618592793335366108</uri>
<email>noreply@blogger.com</email>
<gd:extendedProperty name="OpenSocialUserId" value="14459911890912057787" />
</author>
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:blogger.com,1999:blog-3188762512334365442</id>
<updated>2010-09-21T13:17:05.777-07:00</updated>
<title>Social Web Blog</title>
<author>
<name>A Googler</name>
<email>noreply@blogger.com</email>
</author>
<generator version="7.00" uri="http://www.blogger.com">Blogger</generator>
<link rel="self" type="application/atom+xml"
href="http://feeds.feedburner.com/SocialWebBlog" />
<entry>
<id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id>
<published>2010-07-19T14:14:00.001-07:00</published>
<updated>2010-07-19T14:32:28.168-07:00</updated>
<title>Announcing New Google Buzz API features</title>
<content type="html"> ... </content>
<link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654
<author>
<name>Timothy Jordan</name>
<uri>http://www.blogger.com/profile/14618592793335366108</uri>
<email>noreply@blogger.com</email>
<gd:extendedProperty name="OpenSocialUserId" value="14459911890912057787" />
Developer DayGoogle 2010
Developer DayGoogle 2010
code.google.com/p/pubsubhubbub
Developer DayGoogle 2010
PubSubHubbub
Publisher SubscriberHub
Developer DayGoogle 2010
PubSubHubbub
1.Subscriber gets Publisher’s feed. The feed contains
a link to the Hub.
Publisher Subscriber
Give me
your latest
content for feed
X, please.
Developer DayGoogle 2010
PubSubHubbub
1.Subscriber gets Publisher’s feed. The feed contains
a link to the Hub.
Publisher Subscriber
I've delegated
distribution of that
content to this Hub.
Developer DayGoogle 2010
PubSubHubbub
2.Subscriber POSTs subscription request to the Hub.
The request contains the URL where the Hub
should POST new updates to the Subscriber.
Publisher SubscriberHub
I want to
subscribe to feed
X. Send updates to
this URL
Developer DayGoogle 2010
PubSubHubbub
3.Hub hits the URL to verify the request was
authentic; Subscriber responds with confirmation to
the Hub.
Publisher SubscriberHub
Hey there! Did
you really send this
request?
Developer DayGoogle 2010
PubSubHubbub
3.Hub hits the URL to verify the request was
authentic; Subscriber responds with confirmation to
the Hub.
Publisher SubscriberHub
Yup, that was
really me, not a
DoS attacker.
Developer DayGoogle 2010
PubSubHubbub
4.a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls the feed
again to find new entries.
I have new
content for feed
X for you!
Publisher SubscriberHub
Developer DayGoogle 2010
PubSubHubbub
Give me
your latest
content for feed
X, please.
Publisher SubscriberHub
4.a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls the feed
again to find new entries.
Developer DayGoogle 2010
PubSubHubbub
Here you go.
Publisher SubscriberHub
4.a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls the feed
again to find new entries.
Developer DayGoogle 2010
PubSubHubbub
4.b) If the Publisher does not inform the Hub, the Hub
will periodically poll the Publisher’s feed for new
updates.
Give me
your latest
content for feed
X, please.
Publisher SubscriberHub
Developer DayGoogle 2010
PubSubHubbub
Here you go.
Publisher SubscriberHub
4.b) If the Publisher does not inform the Hub, the Hub
will periodically poll the Publisher’s feed for new
updates.
Developer DayGoogle 2010
PubSubHubbub
New update
to feed X! Here
you go.
Publisher SubscriberHub
5.When Hub receives new update to feed X, it POSTs
the update to the Subscriber’s endpoint URL.
Developer DayGoogle 2010
PubSubHubbub
New update
to feed X! Here
you go.
Publisher SubscriberHub
6.If feed X has multiple subscribers, the Hub sends
updates to all of them. This reduces load on the
Publisher.
SubscriberSubscriberSubscriberSubscriberSubscriber
Developer DayGoogle 2010
PubSubHubbub
Developer DayGoogle 2010
code.google.com/p/pubsubhubbub
Developer DayGoogle 2010
salmon-protocol.org
Developer DayGoogle 2010
Salmon
Source Aggregator
PubSubHubbub
I have a new
entry
1.New entry is posted on Source, pushed to
subscribers via mechanisms such as
PubSubHubbub, and re-published by an
Aggregator.
Developer DayGoogle 2010
Salmon
Source Aggregator
A new entry? I
will re-publish it
right away.
1.New entry is posted on Source, pushed to
subscribers via mechanisms such as
PubSubHubbub, and re-published by an
Aggregator.
PubSubHubbub
Developer DayGoogle 2010
Salmon
Source Aggregator
Salmon
I have a new
comment on that
entry from you!
2.New comment is posted on the Aggregator. It
pushes the comment back upstream to the Source
using Salmon
Developer DayGoogle 2010
Salmon
Source Aggregator
2.New comment is posted on the Aggregator. It
pushes the comment back upstream to the Source
using Salmon
A new comment? I
will publish it in the thread
right away [*].
Salmon
[*] After using magic security pixie dust to verify provenance.
Developer DayGoogle 2010
Salmon
Source
Aggregator
3.The Source pushes the comment to all subscribers.
PubSubHubbub
AggregatorAggregatorAggregatorAggregatorAggregatorAggregator
I have a new
comment.
Developer DayGoogle 2010
Salmon
Source
Aggregator
3.The Source pushes the comment to all subscribers.
PubSubHubbub
AggregatorAggregatorAggregatorAggregatorAggregatorAggregator
Thanks, we'll re-
publish this right
away.
Developer DayGoogle 2010
Salmon
Source
3.The Source pushes the comment to all subscribers.
Aggregator
Salmon
I have a new
comment on that
entry from you!
Developer DayGoogle 2010
Salmon
Source
3.The Source pushes the comment to all subscribers.
Aggregator
Salmon
A new comment? I
will publish it in the thread
right away.
Developer DayGoogle 2010
Salmon
Source
Aggregator
3.The Source pushes the comment to all subscribers.
PubSubHubbub
AggregatorAggregatorAggregatorAggregatorAggregatorAggregator
Thanks, we'll re-
publish this right
away.
Aggregator
Salmon
Developer DayGoogle 2010
salmon-protocol.org
Developer DayGoogle 2010
activitystrea.ms
Developer DayGoogle 2010
Activity Streams
Actor
Developer DayGoogle 2010
Actor
Verb
Activity Streams
Developer DayGoogle 2010
Actor
Verb
Object
Activity Streams
Developer DayGoogle 2010
Timothy
Posts
A Note
Activity Streams
Developer DayGoogle 2010
Barack Obama
Started Following
Timothy Jordan
Activity Streams
Developer DayGoogle 2010
Timothy Jordan
Started Following
Barack Obama
Activity Streams
Developer DayGoogle 2010
Timothy Jordan
Has Tea With
Bella Swan
Activity Streams
Developer DayGoogle 2010
Timothy Jordan
Has Tea With
Bella Swan
Activity Streams
Developer DayGoogle 2010
activitystrea.ms
Developer DayGoogle 2010
Developer DayGoogle 2010
Google Buzz API
Developer DayGoogle 2010
Warning!
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Activity Streams
Developer DayGoogle 2010
Actor
Verb
Object
Developer DayGoogle 2010
Timothy
Posts
A Note
Developer DayGoogle 2010
     "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com,
2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?altu003djson",
     "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"
     }
    ]
   }
  },
Developer DayGoogle 2010
    }
   ],
   "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": [
Developer DayGoogle 2010
     "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?altu003djson",
     "title": "Public"
    }
   ]
  }
 }
Developer DayGoogle 2010
{
  "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?altu003djson",
     "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?altu003djson",
Developer DayGoogle 2010
{
  "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?altu003djson",
     "type": "json"
Developer DayGoogle 2010
   ],
   "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?altu003djson",
     "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": {
Developer DayGoogle 2010
   "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?altu003djson",
     "title": "Public"
    }
   ]
  }
 }
Developer DayGoogle 2010
   "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"
    }
   ]
  }
 }
Developer DayGoogle 2010
   "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"
    }
   ]
},
"geocode": "37.783471 -122.39922",
"address": "701-737 Folsom St, San Francisco, CA 94103, USA",
"placeName": "300 3rd St, San Francisco, CA 94107"
}
 }
Developer DayGoogle 2010
Developer DayGoogle 2010
    "object": {
     "type": "note",
     "content": "content goes here",
"attachments": [
{
"type": "article",
"title": "Name of the link",
"links": {
"alternate": [
{
"href": "{url}/to/article.html",
"type": "text/html"
}
]
}
}
]
    }
Developer DayGoogle 2010
Developer DayGoogle 2010
    "object": {
     "type": "note",
     "content": "content goes here",
     "attachments": [
      {
       "type": "photo",
       "links": {
        "preview": [
         {
          "href": "{url}/image_thumb.jpg",
          "type": "image/jpeg"
         }
        ],
        "enclosure": [
         {
          "href": "{url}/image.jpg",
          "type": "image/jpeg",
          "height": 190,
          "width": 260
         }
        ]
       }
      }
     ]
    }
Developer DayGoogle 2010
    "object": {
     "type": "note",
     "content": "content goes here",
"attachments": [
{
"type": "video",
"title": "video description goes here",
"links": {
"alternate": [
{
"href": "http://www.youtube.com/watch?v=abcdef",
"type": "text/html"
}
],
"preview": [
{
"href": "{url}/default.jpg",
"type": "image/jpeg"
},
{
"href": "{url}/proxy?thumbnail_default.jpg",
"type": "image/jpeg"
}
]
}
Developer DayGoogle 2010
Favorite
Follow
Friend
Join
Play
Post
Save
Share
Tag
Update
Article
Audio
Bookmark
Comment
File
Folder
Group
List
Note
Person
Photo
Photo Album
Place
Playlist
Product
Review
Service
Status
Video
Verbs Objects
Developer DayGoogle 2010
Favorite
Follow
Friend
Join
Play
Post
Save
Share
Tag
Update
Article
Audio
Bookmark
Comment
File
Folder
Group
List
Note
Person
Photo
Photo Album
Place
Playlist
Product
Review
Service
Status
Video
Verbs Objects
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Activity Streams
Developer DayGoogle 2010
https://www.google.com/buzz/api/auth/OAuthAuthorizeToken
?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbuzz
&domain=www.example.org
&oauth_token=
Auth url: https://www.google.com/buzz/api/auth/OAuthAuthorizeToken
scope: https://www.googleapis.com/auth/buzz
domain: www.example.org
iconUrl: http://www.example.org/icon.png
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
PubSubHubbub
Developer DayGoogle 2010
Photo credit: Nandhp, used under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Examples
Developer DayGoogle 2010
buzz-bingo.appspot.com
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
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
)
Developer DayGoogle 2010
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
  )
Developer DayGoogle 2010
# User visits the authorization_url
Sign-In & Auth for Buzz
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
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
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Board Marked
if post.attachments:
  for attachment in post.attachments:
    if attachment.type == 'article':
      self.award_badge('share')
      break
if post.geocode and 
    post.actor.id != self.key().name():
  self.award_badge('geo')
elif post.geocode:
  self.award_badge('mobile')
Developer DayGoogle 2010
Board Marked
# Create the attachments for the post
badge_attachment = buzz.Attachment(
  type='photo', enclosure=badge.badge_icon
)
link_attachment = buzz.Attachment(
  type='article',
  title='Buzz Bingo',
  uri='http://buzz-bingo.appspot.com/'
)
Developer DayGoogle 2010
Board Marked
# Assemble our announcement Buzz post
badge_post = buzz.Post(
  content=post_content,
  attachments=[
    badge_attachment,
    link_attachment
  ],
  geocode=VENUE_GEOCODE,
  place_id=VENUE_PLACE_ID
)
# Create the post
self.client.create_post(badge_post)
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Bingo!
if (5 in horizontal_counts) or 
    (5 in vertical_counts):
  self.award_badge('bingo')
Developer DayGoogle 2010
Developer DayGoogle 2010
Buzz Bingo is open source!
code.google.com/p/buzz-bingo
buzz-bingo.appspot.com
Developer DayGoogle 2010
Track
Extras
Developer DayGoogle 2010
Timothy Jordan
Developer Advocate, Google
buzz.timothyjordan.com
@timothyjordan
#gdd2010jp
Office Hours
16:00 - 16:30
By the “Cool API” sign
Let’s Talk
Developer DayGoogle 2010
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

Google Developer Day 2010 Japan: 新 SocialWeb: 全てはオープンスタンダードの元に (ティモシー ジョーダン)