php - Posting to a Facebook page is showing on the "POSTS TO PAGE" panel -


i got code below website seems working fine. problem posts appear on "posts page" section of facebook page instead of appearing on page timeline directly.

any idea why?

also, code works when use access token, not app access token. when using app access token, error message saying: "(#200) user hasn't authorized application perform action"

<?php // require facebook php sdk // see: https://developers.facebook.com/docs/php/gettingstarted/ require_once("/your_path_to/facebook_php_sdk/facebook.php");  // initialize facebook class using own facebook app credentials // see: https://developers.facebook.com/docs/php/gettingstarted/#install $config = array(); $config['appid'] = 'your_app_id'; $config['secret'] = 'your_app_secret'; $config['fileupload'] = false; // optional  $fb = new facebook($config);  // define post parameters (replace own values) $params = array(   "access_token" => "your_access_token", // see: https://developers.facebook.com/docs/facebook-login/access-tokens/   "message" => "here blog post auto posting on facebook using php #php #facebook",   "link" => "http://www.pontikis.net/blog/auto_post_on_facebook_with_php",   "picture" => "http://i.imgur.com/lhkosih.png",   "name" => "how auto post on facebook php",   "caption" => "www.pontikis.net",   "description" => "automatically post on facebook php using facebook php sdk. how create facebook app. obtain , extend facebook access tokens. cron automation." );  // post facebook // see: https://developers.facebook.com/docs/reference/php/facebook-api/ try {   $ret = $fb->api('/your_facebook_id/feed', 'post', $params);   echo 'successfully posted facebook'; } catch(exception $e) {   echo $e->getmessage(); } ?> 

you need change page settings fix posts page issue:

please make sure recent posts others turned on , post visibility setting set "allow posts other people on page timeline."

you can learn more these settings in our center: https://www.facebook.com/help/356113237741414/?ref=u2u


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -