To get a sharable link for a file in DropBox !
There is a method in DBRestClient.h that you should take a look at!
- (void)loadSharableLinkForFile:(NSString *)path;
and their delegate Methods as well!!
- (void)restClient:(DBRestClient*)restClient loadedSharableLink:(NSString*)link
forFile:(NSString*)path;
- (void)restClient:(DBRestClient*)restClient loadSharableLinkFailedWithError:(NSError*)error;
example : let us consider i have a file MyContacts in my Dropbox
then to share it ,
[[self restClient] loadSharableLinkForFile:@"/MyContacts"];
and their delegate methods
- (void)restClient:(DBRestClient*)restClient loadedSharableLink:(NSString*)link
forFile:(NSString*)path
{
NSLog(@"Sharable link %@",link);
NSLog(@"File Path %@ ",path);
}
- (void)restClient:(DBRestClient*)restClient loadSharableLinkFailedWithError:(NSError*)error
{
NSLog(@"Error %@",error);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…