Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Added : Kosso : log out of dropbox
// REQUIRES https://github.com/kosso/TiCookiejar v0.1
var cookiejar = require('com.kosso.cookiejar');
var logout = function() {
cookiejar.clearWebViewCookies('.dropbox.com');
Ti.App.Properties.setString('DROPBOX_TOKENS', null);
}
var dropbox = require('dropbox');
var client = dropbox.createClient({
app_key : 'xxxxxxxxxxxxxxxxxxxx', // <--- you'll want to replace this
app_secret : 'xxxxxxxxxxxxxxxxx', // <--- and this with your own keys!
root : "dropbox" // optional (defaults to sandbox)
});
// see : https://www.dropbox.com/developers/apps
var getAccount = function() {
var options = {
};
client.account(options, function(status, reply) {
Ti.API.info(status);
Ti.API.info(reply);
});
};