On Friday, June 14, 2013 4:56:23 PM UTC-5, Vivek Kumar wrote:

> well I dont think so. I did not say that reading any random users 
> account.  Facebook, twitter does that all the time where you can read the 
> stream of a user using his accessToken etc. You authenticate the app via 
> settings to let it access the account offline and then your app does not 
> need to user manually authenticate it
>
>
Then my first reply still stands.

You need the user to first explicitly grant your application permission to 
access their documents (that's the authorization code). Your application 
turns over that authorization code to Google and gets back credentials 
(which is the Credentials object in the Java Google Drive library). You can 
then save these credentials to the datastore, flat file, etc and then use 
them for an indefinite period of time (or until the user revokes your app's 
permissions).

Here is some sample code (it's the DrEdit example application from Google): 
https://github.com/googledrive/dredit/blob/master/java/src/com/google/drive/samples/dredit/DrEditServlet.java
 . 
If you look at lines 163 through 182 (the method handleCallbackIfRequired), 
the application takes the auth code, gets access credentials from it, and 
then saves the access credentials to the datastore for use later on.

-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

My Go side project: http://invalidmail.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to