gpt4 book ai didi

ios - 从 native ios 应用程序固定图像时出现无效参数 'image_url' 错误

转载 作者:行者123 更新时间:2023-12-01 16:44:42 25 4
gpt4 key购买 nike

我正在尝试将 pin it 按钮集成到我的 native ios 应用程序中。下面是用于选择图像和存储 ImageURL 的 mycode。

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
chosenImage = info[UIImagePickerControllerEditedImage];
self.imageView.image = chosenImage;
NSURL* localUrl = (NSURL *)[info valueForKey:UIImagePickerControllerReferenceURL];
imgURL = [NSString stringWithFormat:@"%@",localUrl];
[picker dismissViewControllerAnimated:YES completion:NULL];
}

并用于固定图像
_pinterest = [[Pinterest alloc] initWithClientId:@"myID"];
[_pinterest createPinWithImageURL:[NSURL URLWithString:imgURL]
sourceURL:[NSURL URLWithString:@"http://www.social-pony.com/"]
description:@"Pinning from MyDemoApp"];

imgURL 在哪里是一个字符串,我在其中存储 ImagURL,这是我在打印日志时在 imgURL 中得到的 “assets-library://asset/asset.PNG?id=CDA5C2B3-3CC0-4FF9-89E5-1F0F5205B7D8&ext=PNG”我知道 URL 有问题但这是我知道获取图像 URL 的唯一方法。

谢谢

最佳答案

Pinterest 目前不支持使用 iOS SDK 上传本 map 片

https://developers.pinterest.com/ios/

Right now, we only support adding an image from a URL. In the future, we’ll support adding local images.

关于ios - 从 native ios 应用程序固定图像时出现无效参数 'image_url' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20897732/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com