I want to integrate Dropbox in my app. I have made one sample example using Dropbox document and sample code.
But the issue is, I don't want to open login popup. So is there any way so that I can use dropbox without login or some where I can set default login ID Password and automatically do login. so that I can use dropbox directly.
Thanks,
Hardik Shah
Well you could put the files in Dropbox and then share them and use the shared URLs as resources to call. We actually do this for some of our developer blog assets. Hope that helps. Careful not to move the files otherwise the links will break.
I used DropBox Core API and generated access token.
That worked fine with me.
NSString *surl = @"https://api.dropbox.com/1/metadata/dropbox/";
NSURL *url = [[NSURL alloc] initWithString:surl];
NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url];
[req setValue:[self getAuth] forHTTPHeaderField:@"Authorization"];
NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration];
[config setHTTPAdditionalHeaders:@{@"Authorization": @"Bearer xxxxxxxxxxxxxxxxxxxx"}]; // replace xs with you access token
NSURLConnection *conn = [[NSURLConnection alloc]initWithRequest:req delegate:self];
of course you need to handle NSURLConnectionDelegate protocol
that example gives you all files and folders at your dropbox account root