I'm trying to build a LinkedIn login on my (Flask) website. For this I'm following the steps I found here: https://developer.linkedin.com/documents/getting-started-javascript-api
I followed the steps 1 to 4, but from there I'm a bit stuck. I currently have the following code:
<!DOCTYPE html>
<head>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: "7762qdzr8qe7db";
</script>
</head>
<body>
<h1>Sign In with LinkedIn</h1>
<script type="in/Login">
Hello, <?js= firstName ?> <?js= lastName ?>.
</script>
</body>
</html>
Supposedly this should show Sign In with LinkedIn
button, but I see absolutely nothing. I'm running this on localhost (url being http://127.0.0.1:5000/linkedin
), but according to the same page I linked at the top, during development that shouldn't be a problem ("During development, 'localhost' works!").
In the screenshots below you'll see that I correctly copy-pasted the API key in the js above:
and even though I use localhost, below you'll see I correctly listed my domain with port 5000 (I also tried without a port):
I also tried putting this html on my TLD, but also to no avail (plus I guess it should work on localhost too). Does anybody know what I'm doing wrong here? All tips are welcome!
[EDIT] The problem turned out to be threefold. I needed to
http://localhost
to the comma separated list of JavaScript API Domains on linkedin.com/secure/developerhttp://localhost:5000
instead of 127.0.0.1:5000
api_key: 7762qdzr8qe7db
Thanks for all the help!
The problem is threefold. You need to
http://localhost
to the comma separated list of JavaScript API Domains on linkedin.com/secure/developerhttp://localhost:5000
instead of 127.0.0.1:5000
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: 7762qdzr8qe7db
</script>