如何打开Pinterest和链接的iOS应用程序进行共享?

如何打开Pinterest和链接的iOS应用程序进行共享?,ios,post,share,linkedin,pinterest,Ios,Post,Share,Linkedin,Pinterest,我正在编写一个iOS应用程序,它需要打开Pinterest和LinkedIn来共享一些东西。(若用户并没有安装它,它将打开safari并共享一些东西) 我尝试使用一些方案,但没有成功。也许你有足够的时间来做这件事 我找到了一些与Pinterest应用程序共享的URL方案。这对我很有用: NSString *sharingURL = [[NSString stringWithFormat:@"pinterestsdk.v1://pinit/?client_id=%@&source_url=

我正在编写一个iOS应用程序,它需要打开Pinterest和LinkedIn来共享一些东西。(若用户并没有安装它,它将打开safari并共享一些东西)

我尝试使用一些方案,但没有成功。也许你有足够的时间来做这件事

我找到了一些与Pinterest应用程序共享的URL方案。这对我很有用:

NSString *sharingURL = [[NSString stringWithFormat:@"pinterestsdk.v1://pinit/?client_id=%@&source_url=%@&image_url=%@&app_name=%@&suggested_board_name=%@&description=%@",@"xxxxxxx", @"shareurl.com", @"shareurl.com/shareMedia.png", @"Your_App_Name", @"Board_Name", @"Your_Description"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:sharingURL]])
{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:sharingURL]];
}
在LinkedIn,我一直在寻找最佳解决方案

哦,也许有办法与LinkedIn应用程序共享,当你在Safari browse上按share时,它为LinkedIn提供了一个选项,并且它可以在没有登录的情况下工作(Safari以前没有登录LinkedIn,只有LinkedIn应用程序)。但LinkedIn的SDK只支持RESTAPI

谢谢,对不起,我的英语不好

打开Pinterest用户配置文件

打开Pinterest板

打开Pinterest销

使用Pintrest SDK

Pin方法

以下是Pintrest IOS SDK链接

:


iOS版PinterestSDK将允许您使用Pinterest对帐户进行身份验证,并代表经过身份验证的用户发出请求。有关受支持端点的详细信息,.

与上面提到的Pinterest SDK答案类似,LinkedIn提供了一个本机iOS SDK,它将促进通过Internet共享内容

你可以在这里下载:


通过此处提供的其他文档:

是否可以重定向以创建包含某些内容的Pin?截至2013年5月20日,Pinterest已经发布了用于固定内容的iOS SDK。更多信息,请访问他们的开发者网站。欲了解更多信息,请点击此处获取表格@Ninh,我已经编辑了我的代码,检查一下,你会发现有帮助的,然后请更新我的答案谢谢,我会尝试的。我尝试过,但可能它只是支持RESTAPI共享。我正在寻找打开他们的ios应用程序并填充一些东西来分享,比如Pinterest。通过LinkedIn URL方案(和SDK),我找到了一些用于打开配置文件的深度链接,但没有任何内容可供共享。您可以使用SDK中的REST helper方法发送API调用以共享内容。再次查看页面中间的“iOS SDK”选项卡,这里提供了一个完整的示例,说明如何在Objective-C中发送共享。
- (IBAction)openPinterestUser:(id)sender {

    // open the Pinterest App if available
    if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"pinterest://user/juliav1"]]) {

        // opening the app didn't work - let's open Safari
        if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.pinterest.com/versluis2000/"]]) {

            // nothing works - perhaps we're not online
            NSLog(@"Dang!");
        }
    }
}
- (IBAction)openPinterestBoard:(id)sender {

    // open the Pinterest App if available
    if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"pinterest://board/versluis2000/ios-projects"]]) {

        // opening the app didn't work - let's open Safari
        if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.pinterest.com/versluis2000/ios-projects/"]]) {

            // nothing works - perhaps we're not online
            NSLog(@"Dang!");
        }
    }
}
- (IBAction)openPinterestPin:(id)sender {

    // open the Pinterest App if available
    if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"pinterest://pin/76279787413881109"]]) {

        // opening the app didn't work - let's open Safari
        if (![[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.pinterest.com/pin/76279787413881109/"]]) {

            // nothing works - perhaps we're not online
            NSLog(@"Dang!");
        }
    }
}
- (void)getPinWithIdentifier:(NSString *)pinId
                      fields:(NSSet *)fields
                 withSuccess:(PDKClientSuccess)successBlock
                  andFailure:(PDKClientFailure)failureBlock;

- (void)createPinWithImageURL:(NSURL *)imageURL
                         link:(NSURL *)link
                      onBoard:(NSString *)boardId
                  description:(NSString *)pinDescription
                  withSuccess:(PDKClientSuccess)successBlock
                   andFailure:(PDKClientFailure)failureBlock;

- (void)createPinWithImage:(UIImage *)image
                      link:(NSURL *)link
                   onBoard:(NSString *)boardId
               description:(NSString *)pinDescription
                  progress:(PDKPinUploadProgress)progressBlock
               withSuccess:(PDKClientSuccess)successBlock
                andFailure:(PDKClientFailure)failureBlock;