How to fix "Unsupported post request" when posting to FB fan page?

I have a script that can execute ff:

  • post a link to user timeline / wall
  • post link to user page as administrator

Posting to the user profile page works great. However, posting to fan page is acting strange, I can post but I am returning an "Unsupported post request" message .

I have searched SO about this issue and tried all the suggested solutions, but still get this error. I tried both the PHP 4.0.0 SDK SDK and PHP 3.2.3 SDK, same error.

Here is an excerpt from my code using SDK 3.2.3:

        $ret_obj = $this->fb_obj->api("/{$page_id}/feed", 'POST',
            array(
                'link' => $link,
                'message' => $message,
            ));


        if($ret_obj){
            return $ret_obj['id'];
        }

        return false;

      

While my code is using SDK 4.0.0:

        $response = (new FacebookRequest(
            $session, 'POST', $edge, array(
                'link' => $link,
                'message' => $message,
            )
        ))->execute()->getGraphObject();


        if($response){
            return($response->getProperty('id'));
        }

        return false;

      

As for the scope of permissions, I am using ff => 'email', 'user_about_me', 'offline_access', 'publish_stream', 'publish_actions', 'manage_pages', 'user_photos', 'user_groups'.

Has anyone encountered this problem?

+3


source to share


1 answer


The error indicates that your application is still in test / sandbox mode. Make your app public and then you can make an API call.



+3


source







All Articles