Example #1
0
        private async void button3_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != null)
            {
                Authentication.DropBoxLogin.TokenResult token = await Authentication.DropBoxLogin.SignInToDropBox(textBox1.Text, @"C:\Test");

                var parameter = new NameValueCollection
                {
                    { "access_token", token.AccessToken }
                };

                var result = OAuthUtility.ExecuteRequest("GET", "https://api.dropbox.com/1/account/info", parameter, null);
                var map    = new ApiDataMapping();
                map.Add("uid", "UserId", typeof(string));
                map.Add("display_name", "DisplayName");
                map.Add("email", "Email");
                UserInfo user = new UserInfo((Dictionary <string, object>)result.Result, map);
                listBox1.Items.Add("DropBox - " + user.DisplayName);
                dropbox.Add(token);
            }
        }
Example #2
0
 public DropBoxFolder(Authentication.DropBoxLogin.TokenResult token)
 {
     this.token = token;
 }