title: Phonegap facebook plugin for android gives me an oauthexception
body: <p>seriously going insane here....</p>
  
  <p>I'm trying to get the phonegap facebook plugin for android to work, but it's really driving me up the wall (no pun intented).</p>
  
  <p>I am using the code from <a href="https://github.com/irnc/phonegap-plugin-facebook-connect/tree/oauth-2.0+irnc" rel="nofollow">https://github.com/irnc/phonegap-plugin-facebook-connect/tree/oauth-2.0+irnc</a>, at least I think I am. </p>
  
  <p>I appear to have two problems:</p>
  
  <ol>
  <li><p>the following callback in the login (from pg-plugin-fb-connect) gives an error because "FB.Auth.setAuthResponse(response.authResponse, response.status);" cannot be found. Am I using an incorrect facebook sdk? <strong>Apparently no, see edit below</strong></p>
  
  <pre><code>PhoneGap.exec(function (response) {
          console.log('PG.FB.login.success: ' + JSON.stringify(response) + ', store into localStorage ...');
          localStorage.setItem(key, JSON.stringify(response));
  
          FB.Auth.setAuthResponse(response.authResponse, response.status);
  
          if (cb) {
              cb(response);
          }
      }, null, service, 'login', ['publish_stream', 'read_stream']);
  },
  </code></pre></li>
  <li><p><strong>When I comment the</strong> <em>FB.Auth.setAuthResponse(response.authResponse, response.status);</em> statement, my login returns successfull! I get an authresponse with an accesstoken and status set to connected. When I try to execute the following code (on success callback) </p>
  
  <pre><code>FB.api('/me/feed', 'post', { message: body }, function(response) {
  if (!response || response.error) {
      console.log(JSON.stringify(response.error, null, 4));
      alert('We are very sorry, but somthing went wrong');
  } else {
    alert('Message was successfully posted to your wall!');
  }
  });
  </code></pre></li>
  </ol>
  
  <p>it gives me an oauthexception message: "An active access token must be used to query information about the current user."</p>
  
  <p>I authenticated with 'read_stream, publish_stream' permissions. </p>
  
  <p>These two are probably related, but I can't find anything about the setAuthReponse call in the facebook api.</p>
  
  <p><strong>EDIT</strong> help is apparently not on it's way, but i've continued my quest to get this to work.</p>
  
  <p>The facebook js sdk I got from the github repo's are all using the 'old' auth methods. I've downloaded the new facebook js sdk and FB.Auth.setAuthResponse is there. I copied the code to my existing js sdk and changed all calls to setSession to setAuthRepsonse. Everything is working fine, except that the <strong>access token doesn't appear to be posted when I make above FB.api calls</strong>. After these changes, the error remains exactly the same! </p>
  
  <p>Oh yeah, I also changed the check in the login callback to check for authResponse instead of session (it's in the example).</p>
  
  <p>Help is more than welcome,
  rinze</p>