title: Facebook OAuthException: Error validating application
body: <p>I have a simple PHP page that is going to be used to post a message to my own wall.</p>
  
  <p>I've obtained an offline_access token that has "read_stream" and "publish_stream" permissions.</p>
  
  <pre><code>define('FB_APIKEY', 'MY_APP_KEY');
  
  define('FB_SECRET', 'MY_APP_SECRET');
  
  define('FB_SESSION', 'MY_OFFLINE_TOKEN');
  
  require_once('facebook.php');
  
  try {
      $facebook = new Facebook(FB_APIKEY, FB_SECRET);
  
      $facebook-&gt;api_client-&gt;session_key = FB_SESSION;
  
      $attachment = array(
          'message' =&gt; 'some meesgae',
          'name' =&gt; 'This is my demo Facebook application!',
          'caption' =&gt; "Caption of the Post",
          'link' =&gt; 'mylink.com',
          'description' =&gt; 'this is a description',
          'actions' =&gt; array(array(
                       'name' =&gt; 'Get Search', 
                       'link' =&gt; 'google.com'
                    ))
      );
  
      $result = $facebook-&gt;api('/me/feed?access_token=' . FB_SESSION, 
                'post', 
                $attachment);
  
       var_dump($result);
  
  } catch(Exception $e) {
       echo $e;
  }
  </code></pre>
  
  <p>When I run this, I get "OAuthException: Error validating application".</p>
  
  <p>I confirmed that my offline token is good. When I go to https://graph.facebook.com/me?access_token=[MY_OFFLINE_TOKEN], it returns my public profile in JSON format correctly.</p>
  
  <p>So, I'm thinking I'm doing something wrong with the API call somewhere but for the life of me I can't seem to figure it out.  I've been wrestling with this issue for the last two days. Could someone please help! :(</p>