All Projects → zyra → Cordova Plugin Linkedin

zyra / Cordova Plugin Linkedin

Licence: mit
Cordova plugin for LinkedIn

Projects that are alternatives of or similar to Cordova Plugin Linkedin

Cordova Admob Pro
🔥 Cordova Plugin for Google AdMob, DFP, ADX. Easy monetization using mobile Ad, with single line of JavaScript. Compatible with Cordova CLI, Inoic, PhoneGap Build, etc.
Stars: ✭ 690 (+3958.82%)
Mutual labels:  phonegap, cordova, cordova-plugin
cordova-plugin-zeep
Zip compression/decompression for the cordova/phonegap platform
Stars: ✭ 27 (+58.82%)
Mutual labels:  cordova, phonegap, cordova-plugin
Blinkid Cordova
ID scanning for cross-platform apps built with Cordova and Phonegap.
Stars: ✭ 44 (+158.82%)
Mutual labels:  phonegap, cordova, cordova-plugin
cordova-swift3-plugin-example
Swift 3 Cordova plugin example to support blog post.
Stars: ✭ 23 (+35.29%)
Mutual labels:  cordova, phonegap, cordova-plugin
cordova-plugin-downloadmanager
A Cordova plugin to download file in system's default download manager
Stars: ✭ 45 (+164.71%)
Mutual labels:  cordova, phonegap, cordova-plugin
cordova-plugin-flurryanalytics
Adds support for all that Flurry Analytics flavored goodness to your Cordova based apps
Stars: ✭ 23 (+35.29%)
Mutual labels:  cordova, phonegap, cordova-plugin
ionic-multi-camera
Take multiple photos one after another
Stars: ✭ 12 (-29.41%)
Mutual labels:  cordova, phonegap
Cordova Plugin Geofence
Geofencing plugin for cordova
Stars: ✭ 261 (+1435.29%)
Mutual labels:  cordova, cordova-plugin
Awesome Cordova
📱 A curated list of amazingly awesome Cordova libraries, resources and shiny things.
Stars: ✭ 269 (+1482.35%)
Mutual labels:  phonegap, cordova
Corber
CLI for building hybrid apps with Ember/Vue/Glimmer/Cordova
Stars: ✭ 327 (+1823.53%)
Mutual labels:  phonegap, cordova
cordova-plugin-today-widget
Add a today widget app extension target to your cordova project.
Stars: ✭ 51 (+200%)
Mutual labels:  cordova, cordova-plugin
Cordova Plugin Native Keyboard
🎹 Add a Slack / WhatsApp - style chat keyboard to your Cordova app!
Stars: ✭ 271 (+1494.12%)
Mutual labels:  phonegap, cordova
Hiapp
A simple and interesting hybrid app. React Native version: http://t.cn/R5LqqLz Demo:
Stars: ✭ 791 (+4552.94%)
Mutual labels:  phonegap, cordova
ionic4-angular6-crud-example
Building CRUD Mobile App using Ionic 4, Angular 6 and Cordova
Stars: ✭ 50 (+194.12%)
Mutual labels:  cordova, phonegap
scanbot-sdk-example-ionic
Scanbot scanner SDK example app for Ionic with Cordova.
Stars: ✭ 24 (+41.18%)
Mutual labels:  cordova, cordova-plugin
ionic-native-sms-retriever-plugin-master
Cross-platform plugin for Cordova / PhoneGap to Retrieve SMS. Available for Android.
Stars: ✭ 16 (-5.88%)
Mutual labels:  cordova, cordova-plugin
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+97311.76%)
Mutual labels:  phonegap, cordova
Toast Phonegap Plugin
🍻 A Toast popup plugin for your fancy Cordova app
Stars: ✭ 503 (+2858.82%)
Mutual labels:  phonegap, cordova
Cordova Plugin Qrscanner
A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
Stars: ✭ 485 (+2752.94%)
Mutual labels:  cordova, cordova-plugin
Cordova Plugin Admob Free
Cordova AdMob Plugin
Stars: ✭ 508 (+2888.24%)
Mutual labels:  cordova, cordova-plugin

DEPRECATION NOTICE

This repository will not be maintained anymore due to LinkedIn announcement that terminates their mobile SDK support. Read more here: https://engineering.linkedin.com/blog/2018/12/developer-program-updates

==========

npm npm npm

Cordova LinkedIn Plugin

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

Installation

  1. Create a LinkedIn app here
  2. Click on your app's name, then select the Mobile page from the side menu
  3. Add package name and hash for Android
  4. Copy the Application Id in the iOS section and use it in the installation command below
cordova plugin add cordova-plugin-linkedin --variable APP_ID=YOUR_APP_ID

Usage

login

login(scopes, promptToInstall, success, error)
  • scopes: Scopes to authenticate with
  • promptToInstall: If set to true, the user will be prompted to install the LinkedIn app if it's not already installed Logs the user in with selected scopes. Available scopes are: r_basicprofile, r_emailaddress, rw_company_admin and w_share.

logout

logout()

A synchronous method that clears the existing session.

getRequest

getRequest(path, success, error)
  • path: The request path Makes a GET request to LinkedIn REST API. You can view the possible paths here.

postRequest

postRequest(path, body, success, error)
  • path: The request path
  • body: The reqeust body Makes a POST request to LinkedIn REST API. You can view the possible paths here.

openProfile

openProfile(memberId, success, error)
  • memberId: Member Id of the user Opens a member's profile in the LinkedIn app.

hasActiveSession

hasActiveSession(success, error)

- - - DEPRECATED - - - This method is deprecated and will be removed in the next major release. Please use getActiveSession instead.

Checks if there is already an existing active session. This should be used to avoid unnecessary login.

The success callback function will be called with one argument as a boolean, indicating whether there is an active session.

getActiveSession

getActiveSession(success, error)

Checks if there is an existing active session.

The success callback function will be called with an object containing the access token and expiry date (if they exist).

Example

// generic callback functions to make this example simpler
var onError = function(e) { console.error('LinkedIn Error: ', e); }
var onSuccesss = function(r) { console.log('LinkedIn Response: ', r); }

// logging in with all scopes
// you should just ask for what you need
var scopes = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share'];

// login before doing anything
// this is needed, unless if we just logged in recently
cordova.plugins.LinkedIn.login(scopes, true, function() {

  // get connections
  cordova.plugins.LinkedIn.getRequest('people/~', onSuccess, onError);
  
  // share something on profile
  // see more info at https://developer.linkedin.com/docs/share-on-linkedin
  var payload = {
    comment: 'Hello world!',
    visibility: {
      code: 'anyone'
    }
  };
  cordova.plugins.LinkedIn.postRequest('~/shares', payload, onSuccess, onError);

}, onError);


// check for existing session
cordova.plugins.LinkedIn.getActiveSession(function(session) {
  if (session) {
    console.log('We have an active session');
    console.log('Access token is: ', session.accessToken);
    console.log('Expires on: ', session.expiresOn);
  } else {
    console.log('There is no active session, we need to call the login method');
  }
});



Contribution

  • Having an issue? or looking for support? Open an issue and we will get you the help you need.
  • Got a new feature or a bug fix? Fork the repo, make your changes, and submit a pull request.

Support this project

If you find this project useful, please star the repo to let people know that it's reliable. Also, share it with friends and colleagues that might find this useful as well. Thank you 😄

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].