From http://www.newfangled.com/direct_javascript_dropbox_api_usage