使用 Pinterest SDK 分享 Pin 图
Share Pin using Pinterest SDK
我正在尝试 post 从我的应用程序发送到 Pinterest
。
我关注了文档:iOS Pin It SDK.
非常简单,但每次我尝试固定图像时,应用程序都会引发异常,或者 Pinterest 应用程序正常打开,但当我固定图像时出现此错误:
获取正确的客户端id。
似乎有问题
我搜索了这个问题并找到了这个结果:
message sent to deallocated instance using Pinterest SDK
,但它对我不起作用!
我的代码:
var pin = Pinterest(clientId: "1446186", urlSchemeSuffix: "prod")
var urll = NSURL(string: "http://placekitten.com.s3.amazonaws.com/homepage- samples/200/287.jpg")!
var sourceURL = NSURL(string: "http://placekitten.com")!
pin.createPinWithImageURL(urll, sourceURL: sourceURL, description: "Pinning from Pin It Demo")
试试下面的代码....我正在我的项目中使用...
_pinterest = [[Pinterest alloc] initWithClientId:@"XXXXX" ];
NSString *imageKey =[NSString stringWithFormat:@"%@",Url];
NSString *captionKey = TempCaption;
NSLog(@"pinterest :%@ -- %@",imageKey,captionKey);
NSURL *imageUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@",imageKey]];
NSURL *sourceUrl = [NSURL URLWithString:kServiceStoreLink];
NSString *descrStr = [NSString stringWithFormat:@"%@",captionKey];
[_pinterest createPinWithImageURL:imageUrl
sourceURL:sourceUrl
description:descrStr];
我正在尝试 post 从我的应用程序发送到 Pinterest
。
我关注了文档:iOS Pin It SDK.
非常简单,但每次我尝试固定图像时,应用程序都会引发异常,或者 Pinterest 应用程序正常打开,但当我固定图像时出现此错误:
获取正确的客户端id。
似乎有问题我搜索了这个问题并找到了这个结果: message sent to deallocated instance using Pinterest SDK ,但它对我不起作用!
我的代码:
var pin = Pinterest(clientId: "1446186", urlSchemeSuffix: "prod")
var urll = NSURL(string: "http://placekitten.com.s3.amazonaws.com/homepage- samples/200/287.jpg")!
var sourceURL = NSURL(string: "http://placekitten.com")!
pin.createPinWithImageURL(urll, sourceURL: sourceURL, description: "Pinning from Pin It Demo")
试试下面的代码....我正在我的项目中使用...
_pinterest = [[Pinterest alloc] initWithClientId:@"XXXXX" ];
NSString *imageKey =[NSString stringWithFormat:@"%@",Url];
NSString *captionKey = TempCaption;
NSLog(@"pinterest :%@ -- %@",imageKey,captionKey);
NSURL *imageUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@",imageKey]];
NSURL *sourceUrl = [NSURL URLWithString:kServiceStoreLink];
NSString *descrStr = [NSString stringWithFormat:@"%@",captionKey];
[_pinterest createPinWithImageURL:imageUrl
sourceURL:sourceUrl
description:descrStr];