简体   繁体   English

如何通过iOS应用程序将URL分享给linkedIn

[英]How to share a URL to linkedIn via iOS app

在iOS应用程序中,我需要通过iOS应用程序与LinkedIn共享URL,并且LinkedIn本机应用程序未安装在设备中。我需要在没有安装LinkedIn应用程序的情况下共享URL请指导我如何cabn我做同样的事情

the different options are detailed under: https://developer.linkedin.com/docs/share-on-linkedin 不同的选项详述如下: https//developer.linkedin.com/docs/share-on-linkedin

via opening SAFARI 通过开通SAFARI

just call a customized URL with openURL: . 只需使用openURL:调用自定义URL openURL:

the format of the url is described by the linkedIn Developer Docs: url的格式由linkedIn Developer Docs描述:

example: 例:

https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network&summary=My%20favorite%20developer%20program&source=LinkedIn

via REST API 通过REST API

eg call via NSURLSession 例如,通过NSURLSession呼叫

https://api.linkedin.com/v1/people/~/shares?format=json

and pass JSON body 并传递JSON正文

eg 例如

{
  "comment": "Check out developer.linkedin.com! http://linkd.in/1FC2PyG",
  "visibility": {
    "code": "anyone"
  }
}

Note that with the REST API, you need to register your app with linkedin (all described in the docs) 请注意,使用REST API,您需要使用linkedin注册您的应用程序(所有文档中都有描述)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM