Fixes issue #28, updating the return_uri to /oauth2callback. Also updated README.
diff --git a/README b/README
index 9a7b28c..8ace1c2 100644
--- a/README
+++ b/README
@@ -1,14 +1,13 @@
This is a prototype implementation of a client
for discovery based APIs.
+
Installation
============
To install, simply say
- $ python setup.py install --record=files.txt
-
-to install the files and record what files are installed in files.txt.
+ $ python setup.py install
If you want to do a "mock install" and simply extend your PYTHONPATH
for the current shell to include this folder and the packages in it, do
@@ -18,29 +17,17 @@
from the root of the project directory.
-Uninstall
-=========
-
- $ cat files.txt | xargs rm -rf
-
-You may need root privileges to do this.
-
-
Running
=======
-Run buzz.py, which will use the apiclient
-library to retrieve the title of the most
-recent entry in Buzz and post a test message.
-The first time you run it you will be prompted
-to authorize the application to access your
-Buzz information.
+After following the install directions (using setup.py or setpath.sh) you
+should be able to cd to samples/buzz and run buzz.py from there, which will use
+the apiclient library to retrieve the title of the most recent entry in Buzz
+and post a test message. The first time you run it you will be prompted to
+authorize the application to access your Buzz information.
$ python samples/buzz/buzz.py
-After following the install directions (using setup.py or setpath.sh) you
-should be able to cd to samples/buzz and run the code from there.
-
Third Party Libraries
=====================
@@ -49,4 +36,9 @@
http://code.google.com/p/httplib2
http://code.google.com/p/uri-templates
+http://code.google.com/p/python-gflags
http://github.com/simplegeo/python-oauth2
+
+Depending on your version of Python, these libraries may also be installed:
+
+http://pypi.python.org/pypi/simplejson/
diff --git a/oauth2client/tools.py b/oauth2client/tools.py
index f2add0b..63d673a 100644
--- a/oauth2client/tools.py
+++ b/oauth2client/tools.py
@@ -125,6 +125,11 @@
print 'Go to the following link in your browser:'
print authorize_url
print
+ if FLAGS.auth_local_webserver:
+ print 'If your browser is on a different machine then exit and re-run this'
+ print 'application with the command-line parameter --noauth_local_webserver.'
+ print
+
if FLAGS.auth_local_webserver:
httpd.handle_request()
diff --git a/samples/new_project_template/main.py b/samples/new_project_template/main.py
index ee356dd..c451e67 100755
--- a/samples/new_project_template/main.py
+++ b/samples/new_project_template/main.py
@@ -17,8 +17,8 @@
"""Starting template for Google App Engine applications.
Use this project as a starting point if you are just beginning to build a Google
-App Engine project. Remember to fill in the OAuth 2.0 client_id, client_secret
-and the developer key, all of which can be obtained from the Developer Console
+App Engine project. Remember to fill in the OAuth 2.0 client_id and
+client_secret which can be obtained from the Developer Console
<https://code.google.com/apis/console/>
"""
@@ -77,8 +77,7 @@
# Build a service object for interacting with the API. Visit
# the Google APIs Console <http://code.google.com/apis/console>
# to get a developerKey for your own application.
- service = build("buzz", "v1", http=http,
- developerKey="<developer key goes here>")
+ service = build("buzz", "v1", http=http)
followers = service.people().list(
userId='@me', groupId='@followers').execute()
text = 'Hello, you have %s followers!' % followers['totalResults']
@@ -88,7 +87,7 @@
def begin_oauth_flow(request_handler, user):
- callback = request_handler.request.relative_url('/auth_return')
+ callback = request_handler.request.relative_url('/oauth2callback')
authorize_url = FLOW.step1_get_authorize_url(callback)
# Here we are using memcache to store the flow temporarily while the user
# is directed to authorize our service. You could also store the flow
@@ -122,7 +121,7 @@
application = webapp.WSGIApplication(
[
('/', MainHandler),
- ('/auth_return', OAuthHandler)
+ ('/oauth2callback', OAuthHandler)
],
debug=True)
util.run_wsgi_app(application)