Answer the question
In order to leave comments, you need to log in
How can I post to a group wall using the Facebook API?
How can I post to a group wall using the Facebook API? - I did everything on this question and the answer from vista1x, but the post is still not published automatically ..
public function post()
{
$fb = new Facebook(array(
'app_id' => $this->app_id,
'app_secret' => $this->app_secret,
'default_graph_version' => 'v2.2',
));
$fb->setDefaultAccessToken($this->access_token);
$data = [
'message' => $this->message,
'source' => $fb->fileToUpload([путь до картинки]),
];
$batch = [
'photo' => $fb->request('POST', "/{$this->page_id}/photos", $data),
];
$responses = $fb->sendBatchRequest($batch);
return $responses;
}
["responses":protected]=>
array(1) {
["photo"]=>
object(Facebook\FacebookResponse)#153 (6) {
["httpStatusCode":protected]=>
int(403)
["headers":protected]=>
array(11) {
["WWW-Authenticate"]=>
string(73) "OAuth "Facebook Platform" "insufficient_scope" "(#200) Permissions error""
array(1) {
["photo"]=>
object(Facebook\FacebookResponse)#153 (6) {
["httpStatusCode":protected]=>
int(403)
["headers":protected]=>
array(11) {
["WWW-Authenticate"]=>
string(156) "OAuth "Facebook Platform" "insufficient_scope" "(#200) This endpoint is deprecated since the required permissions manage_pages,publish_pages are deprecated""
["Expires"]=>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question