Closed mbielkin closed 6 years ago
It happens because it cannot locate accessToken
internally. Please check if this.accessToken
that you passed is a valid one.
Also, the ideal way to use should be:
const linkedIn = this.LinkedInConnection.init(this.accessToken); // this returns an instance initiated with access token.
return new Promise((resolve, reject) => {
linkedIn.companies.share(process.env. LINKEDIN_COMPANY_ID, params, (err, company) => {
if (err) return reject(err);
return resolve(company);
});
});
PS: I'm re-writing whole library to ONLY
support promises and up-to-date test covered code. It is very unstable and under-development (don't know when would it be live!) but you may keep an eye over it so you don't have to wrap promises anymore :)
Have a look node-linked@v2.0!
@ArkeologeN Thanks, the issue really was connected to accessToken. Now everything works fine. Obviously will upgrade to v2.0 after it go live.
Hi there. I occurred the next issue:
Here is how I use your library: Authorize and call callback endpoint successfully. Save accessToken into the object. Then I call
Could you please tell me, what I do wrong. Or may be there is an issue in the library. Thanks.