The LinkedIn guide for setting up auth with the Javascript SDK shows a code sample but it's very confusing as to what the author actually means.
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: [API_KEY]
onLoad: [ONLOAD]
authorize: [AUTHORIZE]
lang: [LANG_LOCALE]
</script>
It's not valid JS, there's no commas, and quotes are omitted. Also, the example shows brackets but these have to be omitted or an error will be thrown. A real-world example would alleviate the confusion, but, of course, none is provided.
Here's a valid example but using a made-up API key (the API key is the same thing as the client ID – the guide doesn't bother to explain that)
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: 93h7nnksxj3ccd
authorize: true
lang: en_US
</script>
As you can see with this other SO question, I'm not the only one who is confused, this guy thought the same thing I did, which is that quotes would be needed.
How does this code actually work? Is this considered valid syntax for a script tag which has the type text/javascript
?
[edit] Re: possible duplicate, seems this is not. See the selected answer. [/edit]