title: How to publish a post on Facebook Page using CURL and without using SDK in PHP
body: <p>I am developing a PHP project that needs Facebook integration. So before I do it on code , I am testing it using Facebook Graph API explorer tool (<a href="https://developers.facebook.com/tools/explorer" rel="nofollow">https://developers.facebook.com/tools/explorer</a>). What I am doing now is.</p>
  
  <blockquote>
    <p>1st Step</p>
  </blockquote>
  
  <pre><code>Get the user access_token by using the button at the top left.
  </code></pre>
  
  <blockquote>
    <p>2nd Step</p>
  </blockquote>
  
  <pre><code>Make a GET request to "me/accounts" to get the page token and page id.
  </code></pre>
  
  <blockquote>
    <p>3rd Step</p>
  </blockquote>
  
  <pre><code>Make a POST request to "{page_id}/feed" with the fields message={message} and access_token={page_token}
  </code></pre>
  
  <p>It worked perfectly and posted on my Facebook Fan Page. But when I try to replace the "3rd Step" with PHP code like this</p>
  
  <pre><code>$data['message'] = "my message";
  
  
  $data['access_token'] = $page_access_token; //page token from 2nd step
  $ch = curl_init();
  curl_setopt($ch,CURLOPT_URL, 'https://graph.facebook.com/{page_id}/feed');
  curl_setopt($ch, CURLOPT_VERBOSE, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  curl_setopt($ch,CURLOPT_POSTFIELDS, $data);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  curl_setopt($ch, CURLOPT_POST, 1);
  
  
  $resp = curl_exec($ch);
  
  curl_close($ch);
  
  $data_resp = json_decode($resp);
  
  print_r($data_resp);
  </code></pre>
  
  <p>It show me this error.</p>
  
  <pre><code>stdClass Object ( [error] =&gt; stdClass Object ( [message] =&gt; (#200) Permissions error [type] =&gt; OAuthException [code] =&gt; 200 ) ) 
  </code></pre>
  
  <blockquote>
    <p>I set the permissions of manage_pages,publish_pages,publish_actions</p>
  </blockquote>