LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I am trying to get the user of my app to allow access to his dropbox. I have taken the code from the Dictionary which should work. When OAuth is called, a stack window pops up with the authorisation from dropbox but quickly disappears again before the user can authorise the app. Here's the code:
constant kAuthURL = "https://www.dropbox.com/oauth2/authorize"
constant kTokenURL = "https://api.dropboxapi.com/oauth2/token"
constant kClientID = "xxxxxx"
constant kClientSecret = "xxxxxxx"
constant kScopes = ""
OAuth2 kAuthURL, kTokenURL, kClientID, kClientSecret, kScopes, 80
if the result is not empty then (Result empty)
answer error "Not authorized!"
else
local tAuth
put it into tAuth tAuth EMPTY since no user interaction?
end if
There's obviously more to this example but not many places to find any other working examples. Has anyone managed and if so, please share your solution.
While I don't have an answer to your specific question, I seem to remember oAuth was on the way out. Of course, I could be wrong about that, I don't really do much with dropbox + Lc.
You may well be right, as I said I don't do much (read that "nothing") in this area
I noted reading the entry on Max's wiki that if your using Lc9, you need to insert the 'start using' statement, and you didn't mention which version of Lc your using.
in:
Commands, Internet OAuth2
Present an authorization dialog for any web service that supports OAuth2 . Please note that for a bug on version 9 you should type: