linkedin-api
linkedin-api copied to clipboard
Working with nodejs
How to use this API with Nodejs? Thanks all
@tomquirk How to use this API with Nodejs? Thanks @tomquirk
First of all i think this place is not for asking programming questions, you can go to stackoverflow for that kind of questions, because this not really "issue" or something.
Anyway let help you;
I'm using with node.js & flask server together like that:
Linkedin api back-end:
from flask import Flask
from linkedin_api import Linkedin
api = Linkedin('[email protected]', 'mysecretpass')
app = Flask(__name__)
@app.route("/")
def get_user():
username = request.args.get('username', 'default_username')
profile = api.get_profile_connections(username)
return profile
Node.js client:
const axios = require('axios');
axios.get('http://127.0.0.1:5000/?username=halitsever')
.then(function (response) {
// handle success
console.log(response.data);
})
.catch(function (error) {
// handle error
console.log(error);
})
.finally(function () {
// always executed
});
Another way for using linkedin api on node.js; you can use python script as child process but you should prevent multiple time logins because it can ban your linkedin account.
I hope that inspire you. @tphuonglam82
First of all i think this place is not for asking programming questions, you can go to stackoverflow for that kind of questions, because this not really "issue" or something.
Anyway let help you;
I'm using with node.js & flask server together like that:
Linkedin api back-end:
from flask import Flask from linkedin_api import Linkedin api = Linkedin('[email protected]', 'mysecretpass') app = Flask(__name__) @app.route("/") def get_user(): username = request.args.get('username', 'default_username') profile = api.get_profile_connections(username) return profile
Node.js client:
const axios = require('axios'); axios.get('http://127.0.0.1:5000/?username=halitsever') .then(function (response) { // handle success console.log(response.data); }) .catch(function (error) { // handle error console.log(error); }) .finally(function () { // always executed });
Another way for using linkedin api on node.js; you can use python script as child process but you should prevent multiple time logins because it can ban your linkedin account.
I hope that inspire you. @tphuonglam82
Thank you very much @halitsever