Post stories (through Facebook App and Game Group API) as the app using PHP SDK

161 views Asked by At

How I can post stories(through Facebook App and Game Group API) as the app using PHP SDK ?

I'm getting a permission error :

(#200) User does not have sufficient administrative permission for this action on this page 

I'm using this params:

$params = array( 
        'message' => 'test',
        'access_token' => $access_token
    );

    $this->facebook->api('/' .$group_id .'/feed', 'post', $params);
1

There are 1 answers

0
Tiep Doan On

First, you need to have publish_actions and either user_groups or user_managed_groups permission to post on behalf of a user to app groups.

Secondly, to post on behalf of the app itself to its app group, the access token must be app_access_token and this action must be done on the server side to avoid app token being leaked.