title: Why does my FB.api request always produce an error response?
body: <p>I have a Facebook app with namespace 'thenovel'.  It has an action 'rate' assigned to an object 'sentence'.  When the 'dofacebookstuff()' function is called, I want the user's rating of a sentence - 'testsentence', for the moment - to be published to their timeline.  'Rating' doesn't require an access token.</p>
  
  <p>Whenever the dofacebookstuff() is called, the error alert pops up.  I have tested whether the '!response' or 'response.error' was causing it, and it is the 'response.error' every time.</p>
  
  <p>I can get the user id, name etc. fine with FB.login but the api call just does not work.  If I go straight to 'https://graph.facebook.com/me/thenovel:rate?sentence=testsentence&amp;access_token=XXXXX', I see the following:</p>
  
  <pre><code>{
  "data": [   ],
  "paging": {
    "next": "https://graph.facebook.com/me/thenovel:rate?sentence=testsentence&amp;access_token=XXXXX&amp;offset=25&amp;limit=25"
  }
  }
  </code></pre>
  
  <p>I have checked my HTML and all the Facebook-related stuff is there and in the right place.  None of the other scripts on the page produce errors.  Here is the function in question:</p>
  
  <pre><code>function dofacebookstuff() {
      FB.api(
            '/me/thenovel:rate?sentence=hello&amp;access_token=' + accesstoken,
            'post',
            function(response) {
               if (!response || response.error) {
                  alert('Error occured');
               } else {
                  alert('Action ID: ' + response.id);
               }
            });
      }
  </code></pre>
  
  <p>Could anyone explain where I'm going wrong?  Where is my response data?</p>