Facebook php sdk4 and app -


i'm developing laravel package post on facebook. code responsible obtaining , storing access token of page post link besides test makes operation correctly app have created test fb . problem create app on facebook put production , second app facebook created the same configuration work when publishing gives me following error: (# 200 ) user hasn 't authorized application perform action .

this code snippet use testing .

 public function gettest(){     //$accesstoken = new accesstoken($this->getparam('token'));         try {                    $page_post = (new facebookrequest($this->session, 'post', '/'.$this->getparam('page_id').'/feed', array(                 'access_token' => $this->getparam('token'),                  'link' => 'link',                 'description' => 'hola mundo desde laravel',                 'picture' => 'link/img.png',                 'message' => 'messge',             ) ))->execute()->getgraphobject()->asarray(); // return post_id             print_r( $page_post );         } catch(facebooksdkexception $e) {             var_dump($this->getparam('token'));             echo  $e->getmessage();            // var_dump($e);             exit;         } 

as authorization of application correctly when enter view user applications see 2 ( works , not) , both same permissions accepted.

fixed , lacked permit : ' publish_pages '

 $params = array(                 'scope' => 'manage_pages','publish_actions','publish_stream','publish_pages'             ); 

Popular posts from this blog

html/hta mutiple file in audio player -

debugging - Reference - What does this error mean in PHP? -