GET URL link from uploaded image to dropbox with SDK

跟風遠走 提交于 2019-11-29 16:07:31
Bala

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);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!