LinkedIn

Contents

A Cordova plugin that lets you use LinkedIn Native SDKs for Android and iOS.

https://github.com/zyra/cordova-plugin-linkedin

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-linkedin npm install @ionic-native/linkedin
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic activate-native-ee --key=YOURPRODUCTKEY ionic integrations add @ionic-native/linkedin

Supported Platforms

  • Android
  • iOS

Usage

import { LinkedIn } from '@ionic-native/linkedin/ngx';

constructor(private linkedin: LinkedIn) { }

...

// check if there is an active session
this.linkedin.hasActiveSession().then((active) => console.log('has active session?', active));

// login
const scopes = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share'];
this.linkedin.login(scopes, true)
  .then(() => console.log('Logged in!'))
  .catch(e => console.log('Error logging in', e));


// get connections
this.linkedin.getRequest('people/~')
  .then(res => console.log(res))
  .catch(e => console.log(e));

// share something on profile
const body = {
  comment: 'Hello world!',
  visibility: {
    code: 'anyone'
  }
}

this.linkedin.postRequest('~/shares', body)
  .then(res => console.log(res))
  .catch(e => console.log(e));