Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

linkedin-js

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkedin-js

easy peasy linkedin client

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

linkedin-js

Easy peasy linkedin client for connect.

npm install linkedin-js

Usage

linkedin-js has two methods.

  • getAccesToken(req, res, callback): Uses oAuth module to retrieve the access_token
  • apiCall(http_method, path, params, callback): Does a call to linkedin API.

Params are sent as javascript objects and parsed to XML. Params must contain the token.

Example using express.js

var express = require('express'),
    connect = require('connect');

var linkedinClient = require('./../')(
      'key',
      'secret',
      'http://localhost:3003/'
    ),
    app = express.createServer(
      connect.cookieDecoder(),
      connect.session()
    );

app.get('/', function (req, res) {
  linkedinClient.getAccessToken(req, res, function (error, token) {
    res.render('auth.jade');
  });
});

app.post('/message', function (req, res) {
  linkedinClient.apiCall('POST', '/people/~/shares',
    { token: { oauth_token_secret: req.param('oauth_token_secret'), oauth_token: req.param('oauth_token') },
      share: {comment: req.param('message'), visibility: {code: 'anyone'}}},
    function (error, result) {
      res.render('message_sent.jade');
    }
  );
});

app.listen(3003);

Keywords

FAQs

Package last updated on 06 Jun 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc