[ad_1]
I'd like to return the state of a user session onLinkedinLoad
once the user has successfully authenticated. It's just a way for me to interact with my database and tell the program what to do.
So here the api will connect user automatically with authorize set to true.
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: api_key
onLoad: onLinkedInLoad
authorize: true
</script>
Now here on window.onload
I'm performing a function if the connection state return true.
window.onload = function()
// Setup an event listener to make an API call once auth is complete
function onLinkedInLoad()
IN.Event.on(IN, "auth", returnLoginState);
//
function returnLoginState()
Has anyone perform something like this before? Is there a way to do this? If not, I'm just going to check if the array returns empty or not as a workaround. But if there is a more genuine way, I'd love to see it.
[ad_2]
لینک منبع