Skip to content

Instantly share code, notes, and snippets.

@drewtang
Created November 5, 2012 17:10
Show Gist options
  • Save drewtang/4018374 to your computer and use it in GitHub Desktop.
Save drewtang/4018374 to your computer and use it in GitHub Desktop.
double callback
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src='https://assets.yammer.com/platform/yam.js' data-app-id="EojZmPyBpg0kPaTCDAanw"></script>
<script>
/* Note: Using yam.config instead of data-app-id also causes duplicate callbacks
yam.config({
appId: 'EojZmPyBpg0kPaTCDAanw'
});
*/
yam.getLoginStatus(getLogin);
var ctr = 1;
function getLogin(response) {
document.body.innerHTML += '<h2>callback #' + ctr++ + '</h2>';
}
</script>
</head>
<body>
<h1>How many callbacks?</h1><br/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment