i’m using this code to post to my application page:
$page_info = $facebook->api("/344722062246773?fields=access_token");
$attachment2 = array('message' => $row["nwmsg"],
'access_token' => $page_info['access_token'],
'name' => $row["nwnm"],
'caption' => $row["nwsubject"],
'picture' => 'http://itradegame.com/itrade/' . $row["nwposter"],
'description' => $row["nwtext"],
'actions' => array(array ('name'=>'Play!','link'=>'https://apps.facebook.com/itradee/')));
$result = $facebook->api('/344722062246773/feed/','post',$attachment2);
but the problem is that i’m schedualing this code to run in a specific time with a cron job and i recieve this error:
Fatal error</b>: Uncaught OAuthException: (#200) The user hasn't authorized the application to perform this action
thrown in
but if i run the page including this code manualy from my browser it works fine.
what is missing in this code?
ok i got it, i thought the publish stream permission will work but i also needed offline_access permission.