{"id":21326220,"url":"https://github.com/masylum/linkedin-js","last_synced_at":"2025-07-12T06:32:58.646Z","repository":{"id":1112602,"uuid":"981768","full_name":"masylum/linkedin-js","owner":"masylum","description":"Easy peasy linkedin client for connect","archived":false,"fork":false,"pushed_at":"2011-10-20T18:03:53.000Z","size":115,"stargazers_count":43,"open_issues_count":9,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-15T23:47:18.739Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/masylum/linkedin-js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masylum.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-10-12T17:43:18.000Z","updated_at":"2023-02-16T22:05:09.000Z","dependencies_parsed_at":"2022-08-16T12:05:09.139Z","dependency_job_id":null,"html_url":"https://github.com/masylum/linkedin-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Flinkedin-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Flinkedin-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Flinkedin-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Flinkedin-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masylum","download_url":"https://codeload.github.com/masylum/linkedin-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225802658,"owners_count":17526452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T21:08:50.005Z","updated_at":"2024-11-21T21:08:50.465Z","avatar_url":"https://github.com/masylum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkedin-js\n\nEasy peasy linkedin client for connect.\n\n``` bash\nnpm install linkedin-js\n```\n\n## Usage\n\nlinkedin-js has two methods.\n\n* getAccesToken(req, res, callback): Uses oAuth module to retrieve the access_token\n* apiCall(http_method, path, params, callback): Does a call to the linkedin API.\n\nParams are sent as JSON.\nParams must contain the token.\n\n[Using JSON with linkedin API](http://developer.linkedin.com/docs/DOC-1203)\n\n## Example using express.js\n\n``` javascript\nvar express = require('express')\n  , linkedin_client = require('linkedin-js')('key', 'secret', 'http://localhost:3003/auth')\n  , app = express.createServer(\n      express.cookieParser()\n    , express.session({ secret: \"string\" })\n    );\n\napp.get('/auth', function (req, res) {\n  // the first time will redirect to linkedin\n  linkedin_client.getAccessToken(req, res, function (error, token) {\n    // will enter here when coming back from linkedin\n    req.session.token = token;\n    \n    res.render('auth');\n  });\n});\n\napp.post('/message', function (req, res) {\n  linkedin_client.apiCall('POST', '/people/~/shares',\n    {\n      token: {\n        oauth_token_secret: req.session.token.oauth_token_secret\n      , oauth_token: req.session.token.oauth_token\n      }\n    , share: {\n        comment: req.param('message')\n      , visibility: {code: 'anyone'}\n      }\n    }\n  , function (error, result) {\n      res.render('message_sent');\n    }\n  );\n});\n\napp.listen(3003);\n```\n\n## Test\n\nlinkdin is fully tested using [testosterone](https://github.com/masylum/testosterone)\n\n``` bash\nmake\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Flinkedin-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasylum%2Flinkedin-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Flinkedin-js/lists"}