Skip to content

Instantly share code, notes, and snippets.

@vivpuri
Created August 19, 2010 13:48
Show Gist options
  • Select an option

  • Save vivpuri/537917 to your computer and use it in GitHub Desktop.

Select an option

Save vivpuri/537917 to your computer and use it in GitHub Desktop.
#Get request token
blogger = gdata.blogger.service.BloggerService(source=DOMAIN_NAME_COM)
blogger.SetOAuthInputParameters(gdata.auth.OAuthSignatureMethod.HMAC_SHA1,
GOOGLE_CONSUMER_KEY,
consumer_secret=GOOGLE_CONSUMER_SECRET)
gdata.alt.appengine.run_on_appengine(blogger)
request_token = blogger.FetchOAuthRequestToken( scopes='https://www.blogger.com/feeds/',
oauth_callback='http://www.example.com/bloggercb')
logging.info('request_token: %s' % request_token)
#Store token
save_request_token(request_token)
#Redirect to auth url
self.redirect(blogger.GenerateOAuthAuthorizationURL())
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment