Skip to content

Instantly share code, notes, and snippets.

@brianly
Created February 11, 2014 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianly/8937864 to your computer and use it in GitHub Desktop.
Save brianly/8937864 to your computer and use it in GitHub Desktop.
<script type="text/javascript"
data-app-id="SPECIFY APP CLIENT ID HERE"
src="https://assets.yammer.com/assets/platform_js_sdk.js"></script>
<script>
yam.getLoginStatus({ token: 'SPECIFY A TOKEN ASSOCIATED WITH APP CLIENT ID' },
function (response) {
if (response.authResponse) {
alert("logged in");
console.dir(response);
}
else {
alert("logged out");
yam.login(function (response) {
if (response.authResponse) {
console.dir(response);
}
});
}
}
);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment