title: Problem with Facebook Open Graph API call... need an active access token?
body: <p>I'm using Facebook's open graph api along with the JavaScript SDK on my site. My goal is for a user to connect to my site and then after performing certain actions on my site publish a message to the users facebook stream. I have the facebook connect function working just fine. During the connect I request email, publish_stream, offline_access permissions. I think those are all I need for what I'm trying to do. Now when the user connects via facebook connect I do get and capture the facebook access token and secret though I don't know what to do with them.</p>
  
  <p>According to Facebook's shoddy documentation for the JavaScript SDK... to do what I'm trying to do it says to use the following code:</p>
  
  <pre><code>var body = 'Reading Connect JS documentation';
  FB.api('/me/feed', 'post', { message: body }, function(response) {
    if (!response || response.error) {
      alert('Error occured');
    } else {
      alert('Post ID: ' + response.id);
    }
  });
  </code></pre>
  
  <p>I'm doing just that as a test and instead of alerting the response I'm stringifying the JSON response and writing to the console. Suffice it to say the stream publish fails and the response is this:</p>
  
  <pre><code>{"error":{"type":"OAuthException","message":"An active access token must be used to query information about the current user."}}
  </code></pre>
  
  <p>If the user is 'connected' to my site via facebook connect and accepted all the permissions I specified, don't I have a valid access token? Is the access token another parameter I have to pass to the api call?</p>