title: LinkedIn Login with basic example not working
body: <p>I would like to add the possibility of LinkedIn login to my project. I followed the tutorial given on the <a href="https://developer.linkedin.com/docs/signin-with-linkedin" rel="noreferrer">LinkedIn developer page</a> and ended up with the following code, really basic stuff from that tutorial:</p>
  
  <pre><code>&lt;!-- linkedin login --&gt;
  &lt;script type="text/javascript" src="//platform.linkedin.com/in.js"&gt;
    api_key:   [MY_API_KEY] {~n}
    authorize: false {~n}
    onLoad: onLinkedInLoad {~n}
  &lt;/script&gt;
  
  &lt;!-- linkedin login play --&gt;
  &lt;script type="text/javascript"&gt;
  
      // Setup an event listener to make an API call once auth is complete
      function onLinkedInLoad() {
          IN.Event.on(IN, "auth", getProfileData);
      }
  
      // Handle the successful return from the API call
      function onSuccess(data) {
          console.log(data);
      }
  
      // Handle an error response from the API call
      function onError(error) {
          console.log(error);
      }
  
      // Use the API call wrapper to request the member's basic profile data
      function getProfileData() {
          IN.API.Raw("/people/~").result(onSuccess).error(onError);
      }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Don't mind the <code>{~n}</code> as I'm using dust.js to render the page and I need them to pass the arguments to the LinkedIn script.</p>
  
  <p>So, the login button appears, this means that LinkedIn was able to connect to my API key correctly, but the Chrome console gives me the following error: <code>Uncaught Error: Could not execute 'onLinkedInLoad'. Please provide a valid function for callback.</code>. Since this is <em>the</em> example given on the tutorial page, I don't know what can be wrong with it. Even if I declare the block of LinkedIn login functions before the call to the LinkedIn <code>in.js</code>, I get the same error.</p>
  
  <p>I think it is a very easy mistake to spot, but I cannot really tell what am I doing wrong.</p>