rls

react-linkedin-sdk

React Linkedin SDK

Showing:

Popularity

Downloads/wk

125

GitHub Stars

26

Maintenance

Last Commit

3yrs ago

Contributors

2

Package

Dependencies

2

Size (min+gzip)

7.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

React Linkedin SDK

A React Component for Linkedin SDK

Getting Started

yarn add react-linkedin-sdk
or
npm install react-linkedin-sdk --save

How to use

Basic

import React from 'react'
import ReactDOM from 'react-dom'
import LinkedinSDK from 'react-linkedin-sdk'

const responseLinkedin = response => {
  console.log(response)
}

ReactDOM.render(
  <LinkedinSDK
    clientId="123456789010"
    callBack={responseLinkedin}
    fields=":(id,num-connections,picture-url)"
    className={'className'}
    loginButtonText={'Login with Linkedin'}
    logoutButtonText={'Logout from Linkedin'}
    buttonType={'button'}
    icon={<Icon />}
    getOAuthToken
  />,
  document.getElementById('demo')
)

Custom permission

By default the component, request only 'public_profile' permission, you can add more permissions on your app.

see https://developer.linkedin.com/docs/fields for permissions list

import React from 'react'
import LinkedinSDK from 'react-linkedin-sdk'

class MyComponent extends React.Component {
  responseLinkedin(response) {
    console.log(response)
  }

  render() {
    return (
      <LinkedinSDK
        clientId="123456789010"
        callBack={responseLinkedin}
        fields=":(id,num-connections,picture-urls::(original))"
        className={'className'}
        loginButtonText={'Login with Linkedin'}
        logoutButtonText={'Logout from Linkedin'}
        buttonType={'button'}
        icon={<Icon />}
        getOAuthToken
      />
    )
  }
}

export default MyComponent

Parameters

paramsvaluedefault value
clientIdstringRequired
fieldsstringRequired
callbackfunctionRequired
classNamestringnone
loginButtonTextstringLogin with Linkedin
logoutButtonTextstringLogout from Linkedin
buttonTypestringbutton
iconstringnone
getOAuthTokenboolfalse

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100