title: Facebook API For Wall Post
body: <p>I am trying to post on facebook wall through <code>FB API</code> and getting this Error in console.</p>
  
  <pre><code>error   
  Object { message="(#200) The user hasn't a... to perform this action", type="OAuthException", code=200} 
  code    200 
  message
  
      "(#200) The user hasn't authorized the application to perform this action"  
  type :"OAuthException" 
  </code></pre>
  
  <p><strong>I am trying this way.</strong></p>
  
  <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  (function() {
      var e = document.createElement('script');
      // replacing with an older version until FB fixes the cancel-login bug
      e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
      //e.src = 'scripts/all.js';
      e.async = true;
      document.getElementById('fb-root').appendChild(e);
  }());
  
  window.fbAsyncInit = function()
  {
      FB.init({
          appId  : 'XXXXXXXXXXXXXXXXXXX',
          status : true, // check login status
          cookie : true, // enable cookies to allow the server to access the session
          xfbml  : true , // parse XFBML
          oauth : true // Enable oauth authentication
      });
  
  
  
  
  };
  
  
  function post_on_wall()
  {
      FB.login(function(response)
      {
          if (response.authResponse)
          {
              alert('Logged in!');
  
              // Post message to your wall
  
              var opts = {
                  message : document.getElementById('fb_message').value,
                  name : 'Post Title',
                  link : 'xxxxxxxxxxxxxxxx',
                  description : 'post description Nanital',
                  picture : 'ImageLink'
              };
  
              FB.api('/me/feed', 'post', opts, function(response)
              {
  
                  if (!response || response.error)
                  {
                      alert('Posting error occured');
                  }
                  else
                  {
                      alert('Success - Post ID: ' + response.id);
                  }
              });
          }
          else
          {
              alert('Not logged in');
          }
      }, { scope : 'publish_stream' });
  }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Note: It is working fine, If i loggedin with same id which through i create this APP. But not working for other facebook user.</strong></p>