6. Company Invites - Ranork/Auto-Linkedin GitHub Wiki
Send company invites to last connections
const client = new LinkedIn()
await client.login('[email protected]', 'your password')
let company = await client.getMyCompany()
let people = await client.getLastConnections(80)
for (let profile of people) {
try {
await company.sendInvite(client, profile.details.name)
}
catch (e) {
console.log(' ' + e.message);
}
}
await client.close()
This code send last 80 connections a company page follow invitation.
sendInvite Method Parameters
/** Send follow invitation to users
* @param {LinkedIn} linkedinClient - Client that will used in visit
* @param {string} nameToSearch - Search keywords for profile name
* @returns {Promise}
*/
async sendInvite(linkedinClient, nameToSearch)