I'm trying to get read-only public information from my LinkedIn profile through the javascript API. I currently have this code, which I know is incomplete:
<script>
function linkedinAuthorized() {
console.log("Linked in authorized");
}
function linkedinLoaded() {
console.log("Linked in loaded");
IN.Event.on(IN, "auth", linkedinAuthorized);
var url = "/people/~?format=json";
IN.API.Raw()
.url(url)
.method("GET")
.result(function (result) {
console.log(result);
})
.error(function (error) {
console.log(error);
});
}
</script>
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: [my key]
onLoad: linkedinLoaded
</script>
I am able to load the linked in successfully, but when perform the IN.API.Raw call I get:
which I suspect is because I have not logged into an account with one of those LinkedIn login buttons.
My question is if can I get read-only profile information from a specific user without going through one of those manual authorization processes?
Might this be linked to this answer ?
My question is if can I get read-only profile information from a specific user without going through one of those manual authorization processes?
The answer is no. LinkedIn use OAuth 2.0, even the tool they provide can't perform the request https://api.linkedin.com/v1/people/~?format=json
.
You need to get the user logged-in to perform such actions !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With