I find the dropbox get shared link using the following code. I used this code to get dropbox get shared link using latest api in ios 9 but my problem is that's
My Code in obj c
DBUserClient *client = [DBClientsManager authorizedClient];
// "Full Dropbox" or "/Apps/<APP_NAME>/" if app has permission "App Folder").
[[client.sharingRoutes getSharedLinkMetadata:path]setResponseBlock:^(DBSHARINGSharedLinkMetadata * _Nullable result, DBSHARINGSharedLinkError * _Nullable routeError, DBRequestError * _Nullable networkError) {
if (result) {
[self sendEmail:result.url];
}
else
{
NSString *title = @"";
NSString *message = @"";
if (routeError) {
// Route-specific request error
title = @"Route-specific error";
if (routeError ) {
message = [NSString stringWithFormat:@"Invalid path: %@", routeError];
}
}
else
{
// Generic request error
title = @"Generic request error";
if ([networkError isInternalServerError]) {
DBRequestInternalServerError *internalServerError = [networkError asInternalServerError];
message = [NSString stringWithFormat:@"%@", internalServerError];
}
else if ([networkError isBadInputError])
{
DBRequestBadInputError *badInputError = [networkError asBadInputError];
message = [NSString stringWithFormat:@"%@", badInputError];
}
else if ([networkError isAuthError])
{
DBRequestAuthError *authError = [networkError asAuthError];
message = [NSString stringWithFormat:@"%@", authError];
}
else if ([networkError isRateLimitError])
{
DBRequestRateLimitError *rateLimitError = [networkError asRateLimitError];
message = [NSString stringWithFormat:@"%@", rateLimitError];
}
else if ([networkError isHttpError])
{
DBRequestHttpError *genericHttpError = [networkError asHttpError];
message = [NSString stringWithFormat:@"%@", genericHttpError];
} else if ([networkError isClientError])
{
DBRequestClientError *genericLocalError = [networkError asClientError];
message = [NSString stringWithFormat:@"%@", genericLocalError];
}
}
UIAlertController *alertController =
[UIAlertController alertControllerWithTitle:title
message:message preferredStyle:(UIAlertControllerStyle)UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:@"OK"
style:(UIAlertActionStyle)UIAlertActionStyleCancel
handler:nil]];
[self presentViewController:alertController animated:YES completion:nil];
//[self setFinished];
}
}];
and results is results image
but first time i create the link then get its make error plz help me how to get link.... please define me in detail.. thanks