I've been succesfully been using the following code to post to my fan page AS the page:
//Call Facebook API
$facebook = new Facebook(array(
'appId' => $appId,
'secret' => $appSecret,
'cookie' => true,
));
$fbPost = array('access_token' => $fbToken, 'message' => $string2 ,'name' => $string2, 'description'=> $description,'link'=> $unshort);
try{
//This is to post a link!
$postResult = $facebook->api('/xxxxxxxxxxxxxxx/feed', 'POST', $fbPost );
echo 'Posted';
echo '<br />';
} catch (Exception $e){
echo 'Didnt Work';
echo '<br />';
echo $e->getMessage();
}
However, my account was temporarily blocked by facebook (don't ask... malicious competitor). After clearing up the situation, the ban on my account has been lifted and I can post on my fan page, however my above PHP script will only post as myself on the page, NOT as the page itself.
After the ban was lifted I had to renew my access tokens, but did this as normal. Since my code hasn't changed, Im guessing it has to do with how I renewd my access token, but everything seems to be in order.
Any ideas as to why my code is now posting as me (the admin) rather then as the page itself?
Thank you!