I am trying to post on a page I administered in Facebook and I use this code.
$fb_key['key'] = 'fb_access_token';
$access = Model_const::read_key($fb_key);
$f = new facebook\fb($cfg);
$f->setAccessToken($access['value']);
$p = 'User is not logged in';
if($f->getUser())
{
$page_arg['access_token'] = $f->getAccessToken();
$page_arg['fields'] = 'access_token';
$page_info = $f->api("/$fb_id",'get',$page_arg);
$fb = array();
$fb['link'] = $uri;
$fb['message'] = Input::post('content');
$fb['access_token'] = $page_info['access_token'];
$p = $f->api("$fb_id/feed",'POST',$fb);
}
I followed this thread here and it appears that $page_info part is not recognized by the FB api. Reading on the documentation didn't help, though I can post using my personal account. I would like to have it on my facebook non-human page.
I was hoping if someone could provide how to do it via PHP SDK.