On Jun 2, 2013, at 6:15 PM, Jon Nall <
jon....@gmail.com> wrote:
>
> My best guess is to register my own URL scheme with the OS and use that to store the returned access token in a file. I'm going to go down that path for now.
You mentioned earlier that you are targeting OS X, so yes, this is how it's done. Pick a unique URI scheme and any necessary path, then parse off the access token.
The problem you're going to have is that since you're writing a ruby script and not a full-fledged application, I don't know how you're going to register a URI scheme with the OS -- I don't think it's possible (directly). Other APIs like Twitter get around this by having a secondary OAuth method that emits a PIN number the user copies/pastes back into the script.
One other note -- you do *not* want to store the access token in a file. Store it in the Keychain[1].
-Greg
[1]
http://developer.apple.com/library/mac/#documentation/Security/Reference/keychainservices/Reference/reference.html
--
Greg Fiumara