Reputation: 9246
How to share text and url in Linkedin from an iOS app. Is it possible without oAuth2 authentication and if not can anyone help me with oAuth2 integration and sharing simply.
Upvotes: 3
Views: 174
Reputation: 20851
It's actually very simple. Just fill in your URL using the format below...
https://www.linkedin.com/sharing/share-offsite/?url={url}
Source: Official LinkedIn Share URL Documentation.
But then, you probably also want to share other information, right? Like title
, description
, and all that other good stuff. Do that using og:
meta tags in your HTML header, like so...
<meta property='og:title' content='Title of the article"/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
<meta property='og:description' content='Description that will show in the preview"/>
<meta property='og:url' content='//www.example.com/URL of the article" />
Source: Official Microsoft "Making Your Website Shareable on LinkedIn" Documentation.
Want to make sure you did it correctly? That's the easiest part. Copy the URL of the website you want to share, like example.com
, and input it here...
Official LinkedIn Post Inspector
Upvotes: 0
Reputation: 5023
No,
Its not possible to Exploit Share Api without Authentication. LinkedIN has its Rest API, that you can use
https://developer.linkedin.com/docs/share-on-linkedin
To tried it out check out APIs, you can play at APIGEE
Git Libraries for Auth 2.0
https://github.com/jeyben/IOSLinkedInAPI
https://github.com/mrugraj/MVLinkedIn-iOS (Under development)
Upvotes: 1