title: Using Dropbox in AIR Desktop Application?
body: <p>I have been trying to make it work for 2 days but havn't been able to. All I need is to be able to download and upload files. But I can't even establish a connection.  I am using the <a href="https://github.com/grossopa/dropbox-as3" rel="nofollow">following</a> API and <a href="https://code.google.com/p/dropbox-as3/source/browse/trunk/HsDropboxTest/src/org/hamster/dropbox/test/DropboxClientTest.as" rel="nofollow">here</a> is an implementation example. Can anyone guide on how to establish a connection and starting uploading and downloading files? </p>
  
  <p>I tried to do this:</p>
  
  <pre><code>        dropboxConfig = new DropboxConfig(consumerKey, consumerSecret, 
                              requestTokenKey, requestTokenSecret, 
                              accessTokenKey,  accessTokenSecret);            
          dropboxClient = new DropboxClient(dropboxConfig);
          dropboxClient.requestToken();
          dropboxClient.accessToken();
          dropboxClient.accountInfo();
  
          dropboxClient.fileCreateFolder(ROOT_FOLDER);
          dropboxClient.addEventListener(DropboxEvent.ACCESS_TOKEN_FAULT, onTokenLoadError, false, 0, true);
          dropboxClient.addEventListener(DropboxEvent.ACCESS_TOKEN_RESULT, onTokenLoadSuccess, false, 0, true);
  private function onTokenLoadError(evt:DropboxEvent):void
      {
          trace("There was an error accessing token");
      }
      private function onTokenLoadSuccess(evt:DropboxClient):void
      {
          trace("connection established successfuly");
      }
  </code></pre>
  
  <p>Any help would be extremely appreciated because I have to submit my project in a few days and I really want to integrate Dropbox with my app.</p>