简体   繁体   中英

User Id in DropBox SDK

How can i find the user id of current User who has logined through XCode In DropBox SDK. I need it done programmatically.

In your code after you've linked, you can add:

[self.restClient loadAccountInfo];

and the delegate:

- (void)restClient:(DBRestClient*)client loadedAccountInfo:(DBAccountInfo*)info {
    NSLog(@"UserID: %@ %@", [info displayName], [info userId]);
}

链接到Dropbox后,您可以尝试以下代码:

NSString* dropbox_id=[[DBSession sharedSession].userIds objectAtIndex:0];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM