$permissions = ['email','publish_actions']; // Optional permissions
try {
// Returns a Facebook\FacebookResponse object
$response = $fb->post('/iduserxxx/feed', $linkData, $accessToken);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
echo 'Posted with id: ' . $graphNode['id'];
}
Graph returned an error: (#200) Requires publish_stream permission
Same here. The weird part is that this permission is deprecated.
Requesting a permission doesn't mean the user will grant it. So there, looks like the logged in user didn't grant the publish permission.
@yguedidi I found the solution to this. The problem was i had to explicit ask for pusblish actions even if the app has already granted from facebook.
@vaggelis2018 Can you tell me how you did it? HELP
@jakelinemartins Hello and sorry for the late response. I was using laravel socialite.
Most helpful comment
@yguedidi I found the solution to this. The problem was i had to explicit ask for pusblish actions even if the app has already granted from facebook.