title: Unable to logout from linkedin using javascript api
body: <p>I have a piece of code to log user out from linkedin and its not working :(</p>
  
  <p>any help will be greatly appreciated. </p>
  
  <hr>
  
  <p>Logout code </p>
  
  <hr>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="http://platform.linkedin.com/in.js"&gt;
    api_key: mykey
    authorize: true
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  try {
      IN.User.logout();
  } catch (err) {
      console.log(err);
  }
  setTimeout("goToHome()", 10000);
  
  function goToHome() {
      location.href="index.php";
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p>console log </p>
  
  <hr>
  
  <pre><code>TypeError
  arguments: Array[2]
  get message: function () { [native code] }
  get stack: function () { [native code] }
  set message: function () { [native code] }
  set stack: function () { [native code] }
  type: "non_object_property_call"
  __proto__: Error
  </code></pre>
  
  <p>Best regards,
  Pawan</p>