Als ik een curl post uitvoer
$url="https://graph.facebook.com/v18.0/{$page_id}/feed/?access_token=".$access_token."&message=".urlencode($message);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_REFERER, '');
curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($curl, CURLOPT_AUTOREFERER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $message);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$json = json_decode(curl_exec($curl));
var_dump($json);
krijg ik:
object(stdClass)#4 (1) { ["error"]=> object(stdClass)#3 (4) { ["message"]=> string(393) "(#200) If posting to a group, requires app being installed in the group, and \ either publish_to_groups permission with user token, or both pages_read_engagement \ and pages_manage_posts permission with page token; If posting to a page, \ requires both pages_read_engagement and pages_manage_posts as an admin with \ sufficient administrative permission" ["type"]=> string(14) "OAuthException" ["code"]=> int(200)
Ik kan nergens "pages_read_engagement and pages_manage_posts" opgeven.
Heeft iemand hetzelfde probleem?