【问题标题】:Retrieve an image from Office 365 into an iOS app将 Office 365 中的图像检索到 iOS 应用程序中
【发布时间】:2015-01-27 00:25:10
【问题描述】:

有人知道如何将 Office 365 中的图像检索到 iOS 应用程序中吗?

图像徽标具有以下返回格式: https://"TENANT".sharepoint.com/"SITE NAME"/SiteAssets/domain1.png

我已经实现了一个自定义 Web API 来检索网站集。一个特定的网站可能有一个徽标,我可以在调用服务后从我的 iOS 应用程序中获取它的网址。

问题是我收到 401 或 403 来获取图像,无论我是否将获取的 Web Api 调用令牌作为授权标头传递。

SDWebImageDownloader *manager = [SDWebImageManager sharedManager].imageDownloader;
[manager setValue:authHeader forHTTPHeaderField:@"Authorization"];


[logo sd_setImageWithURL:[NSURL URLWithString:site.logo] placeholderImage:[UIImage imageNamed:@"cross"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        NSLog(@"Error: %@", error);
    }];

错误:Error Domain=NSURLErrorDomain Code=401“操作无法完成。(NSURLErrorDomain 错误 401。)”

【问题讨论】:

    标签: ios image sharepoint office365 sdwebimage


    【解决方案1】:

    解决方案是开发自定义 Web API 并使用 SharePointOnlineCredentials 传递凭据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多