Q: "An access token is required to request this resource." while posting message to FB page using PHP I'm trying to create one PHP application which ll post message to FB page directly. But facing some issues while posting message. I got following error:- 
{
   "error": {
      "message": "An access token is required to request this resource.",
      "type": "OAuthException",
      "code": 104
   }
} 

Following is my code:-
<?php 

    class Facebook
    {
        private $page_id = 'Page ID';   
        private $page_access_token = 'access-code';
        private $post_url = '';

        public function Facebook()
        {
            $this->post_url = 'https://graph.facebook.com/'.$this->page_id.'/feed';
        }

        public function message($data)
        {
            $data['access_token'] = $this->page_access_token;
            $ch = curl_init();
            echo "Link:- ".$this->post_url;
            curl_setopt($ch, CURLOPT_URL, $this->post_url);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            $return = curl_exec($ch);
            curl_close($ch);
            return $return;
        }
    }

    $facebook = new Facebook(); 
    $facebook->message(array( 'message'  => 'Best Service'));
    ?>

I tried alot to solve this error. I checked access token n page ID also both are correct but still getting this error.
Please guide me to solve this error....
Thanks in advance......
