I have some java code that work on the command line, and need to integrate them with a PHP based site开发者_如何转开发. Instead of uploading the files to this site, users need to give access to dropbox so that the java code can read the files stored in there. Is it possible to do the oauth part in php and then give the java code to access to all the files in the directory (using java sdk)? I'll probably use php system()
to invoke the java code.
Sorry if this sounds vague ... trying to be short, but I can go to amazing levels of elaboration to get an answer :)
You would use the PHP site to do the OAuth dance to get your application authenticated with the user. The access token returned can then be used by the java program to access the data. You would need some shared data storage that the PHP can write to (to store the access token) and the java program can read from (to retrieve the access token).
精彩评论