objective-c - 如何获取访问 token Dropbox 用户 IOS

标签 objective-c ios dropbox

我几乎可以使用 dropbox 框架连接、断开连接、下载等来完成所有操作。我想获取访问 token ,但以下方法返回 null

在 .m 文件之一中

//try to get access token
    MPOAuthCredentialConcreteStore *credentials=[[MPOAuthCredentialConcreteStore alloc] init];
    NSLog(@"access token %@",credentials.accessToken);

知道如何让用户访问 token 吗?

最佳答案

您可能无法获取accessToken,但可以获取用户信息

[self.restClient loadAccountInfo];



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

关于objective-c - 如何获取访问 token Dropbox 用户 IOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13089817/

相关文章:

ios - UITableView 设置为静态单元格。是否可以以编程方式隐藏某些单元格?

ios - 仅在 iphone 4 上的 Cordova 应用程序元素移动

ios - UILabel 自动换行功能即使有足够的空间供单词使用也能留出空间

dropbox - 我是否需要 Dropbox 应用才能将文件上传到我自己的 Dropbox?

git - 跨计算机同步 git 存储库

objective-c - 在 Ipad 中直接从 UiTextView 创建多页 PDF

iOS:presentViewController 错误不鼓励在分离的 View Controller 上呈现 View Controller

ios - 无法将 NSRange 类型的值转换为预期的参数类型

python - django-storages dropbox.stone_validators.ValidationError

objective-c - 游戏套件(GKSession): Is there a priority order when GKSession decides to use Wifi or Bluetooth (if both are available)