I have a piece of code to log user out from linkedin and its not working :(
any help will be greatly appreciated.
Logout code
<html>
<head>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: mykey
authorize: true
</script>
<script type="text/javascript">
try {
IN.User.logout();
} catch (err) {
console.log(err);
}
setTimeout("goToHome()", 10000);
function goToHome() {
location.href="index.php";
}
</script>
</head>
</html>
console log
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
Best regards, Pawan