cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you using the Microsoft co-authoring beta for Dropbox? Share your feedback and learn more about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox V2, shared folders not listed?

Dropbox V2, shared folders not listed?

808phone
Explorer | Level 4

When I query a folder, shared folders do not appear in the list. How do I display them?

 

DBUserClient *client = [DBClientsManager authorizedClient];
if (client != nil)
{
[[client.filesRoutes listFolder:dbPath] setResponseBlock:^(DBFILESListFolderResult *result, DBFILESListFolderError *routeError, DBRequestError *error) {
if (result) {

NSLog(@"result.entries %@.",result.entries);

for (DBFILESFolderMetadata *entry in result.entries)
{
if ([entry isKindOfClass:[DBFILESFolderMetadata class]]) {
DBFILESFolderMetadata *folderMetadata = (DBFILESFolderMetadata *)entry;

NSLog(@"Folder: %@", folderMetadata.name);
if (folderMetadata.sharedFolderId == nil) // no shared folders
[files addObject:folderMetadata];
}
}
myActionHandler(files);
}
}];
}
2 Replies 2

Greg-DB
Dropbox Staff
The shared folders are likely just not included on the first page of results. When using listFolder, make sure you check the hasMore value. If it's true, you need to call back to listFolderContinue to get more results.

There's an example of doing so here:

https://github.com/dropbox/dropbox-sdk-obj-c#rpc-style-request

808phone
Explorer | Level 4
Thank you! I was able to resolve the problem!
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    808phone Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?