sintaxi / dbox

NodeJS SDK for Dropbox API (THIS LIBRARY IS OBSOLETE!!)
513 stars 91 forks source link

logout in titanium android #47

Closed fastian451 closed 11 years ago

fastian451 commented 12 years ago

how to clear cookies in titanium android and logout from dropbox. I am only able to create a folder in my dropbox. but afterwards the application doesn't even work. it just shows the titanium startup page and never shows the drop box directories...

I cannot not figure out the problem as I am new to titanium as well as drop box api.

any help would be greatly appreciated..!

jstroem commented 12 years ago

hmm, have you tried to catch any js errors?

fastian451 commented 12 years ago

no... I am having difficulty in calling the drop box api in my titanium android project. can you please guide me how should i start. is there any custom module and sample titanium example so that I can easily embed it in my application.

jstroem commented 12 years ago

hmm not at this point, you can read the how to use https://github.com/sintaxi/node-dbox#how-to-use but there is no demo currently availble.

jstroem commented 11 years ago

Think this should be closed, the problem is that the project depends on request and node.js which is not available on titanium.

sintaxi commented 11 years ago

@fastian451 can you confirm that you have access to nodejs within titanium?

fastian451 commented 11 years ago

well I didn't understand your question. I have just followed this link and installed nodejs. then run the command npm install. it installed the some modules. I have also run the command, npm install querystring. it downloaded the query string module in my titanium project that also contained the querystring.js file in it that I had to include in dbox.js. but when i ran the command npm install request. it downloaded the request nodule without request.js in it. I dont' know how access nodejs in titanium.

fastian451 commented 11 years ago

@sintaxi why we need nodeJs api here??? Can't we call dropbox api without using the nodeJS api???

sintaxi commented 11 years ago

@fastian451 I'm sorry for the trouble. It looks like you have spent some time on this.

It is possible to talk to the Dropbox API without using nodejs but that is outside of the scope of this library. I currently have the description as NodeJS SDK for Dropbox API so that should be clear but sorry if it isn't (perhaps SDK is a confusing term).

NodeJS is runtime that gives you non-blocking, event-driven I/O on top of Google's JavaScript engine (V8). What this library provides is a convenient way to access the Dropbox API from that runtime.

The Dropbox API is an HTTP interface which means you can speak to it from many different environments. I would take a look at this stack overflow question which has an explanation on how to make XHR requests from within Titanium...

http://stackoverflow.com/questions/8709033/how-to-call-a-webservice-in-titanium-using-javascript

Using those techniques it should be possible for you to write your own Dropbox SDK for the Titanium environment. Or just talk to the API ad hoc style. Here are the API docs that I followed to create dbox...

https://www.dropbox.com/developers/reference/api

Hope this helps clear up the confusion.