Created
August 19, 2010 13:48
-
-
Save vivpuri/537917 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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