title: Yammer authentication issues
body: <p>I'm creating an app on Outsystems, which uses the Yammer API. The issue is the Yammer authentication is causing some problems. In the "OnReady" property  of the page, I've added the following code:</p>
  
  <pre><code>yam.getLoginStatus(
  function(response) {
  if (response.authResponse) {
    console.log("logged in");
    $parameters.Token = response.access_token.token;
    console.dir(response); //print user information to the console
  }
  else {
    yam.platform.login(function (response) { //prompt user to login and authorize your app, as necessary
      if (response.authResponse) {
        console.dir(response); //print user information to the console
        console.dir(response.access_token.token);
        $parameters.Token = response.access_token.token;
        console.dir($parameters.Token);
      }
    });
  }
  }
  );
  </code></pre>
  
  <p>It successfully returns a token, which I am able to verify using console.log(). Additionally, I've added a Login button which has the same code in its OnClick property.</p>
  
  <p>The issue is, when I try to perform the Get Messages API call (Endpoint: <a href="https://www.yammer.com/api/v1/messages.json" rel="nofollow noreferrer">https://www.yammer.com/api/v1/messages.json</a>) from OnReady, it gives me the 401 Unauthorized access error. But, when I additionally use the OnReady, and also click the Login button, the API call is successful. I don't understand why, because the token received by both calls are the exact same, but it works after the user logs in twice? Any way to rectify this?</p>
  
  <p>P.S. I've tried using the other endpoint (<a href="https://api.yammer.com/api/v1/messages.json" rel="nofollow noreferrer">https://api.yammer.com/api/v1/messages.json</a>). I'm getting the same problem.</p>