facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.17k stars 1.95k forks source link

Photos uploaded with API to pages have no reach #1202

Open pluzmedia opened 4 years ago

pluzmedia commented 4 years ago

I am having strange issue that when i upload photos with API to pages have no reach but the post has reach when i post photo status with Facebook dashboard. If someone have the same issue let me know how to fix it. Below is my code to post photo status with PHP sdk. Thanks in advance.

$data = [ 'caption' => $message, 'source' => $fb->fileToUpload($file) ]; $access_token = $page->access_token; $response = $fb->post("/" . $pageid . "/photos", $data, $access_token, null, 'v2.10');