I'm using facebook PHP SDK 3.1.1, an iFrame app can post on the logged on users wall who is already a fan of the page.
Following is the coe and it gives me error "Fatal error: Uncaught OAuthException: (#200) The user hasn't authorized the application to perform this action thrown in"
/*post starts*/
$attachment = array('message' => 'test message',
'name' => 'test app!',
'caption' => "Caption of the Post",
'link' => 'http://apps.facebook.com/phpsdk_demoapp/',
'description' => 'It is fun!',
'picture' => 'http://www.takwing.idv.hk/facebook/demoapp_phpsdk/img/logo.gif',
'actions' => array(array('name' => 'Start Learning',
'link' => 'http://www.takwing.idv.hk/tech/fb_dev/index.php'))
);
$result = $facebook->api('/me/feed/',
'post',
$attachment);
/*post ends*/
I guess the part that takes permission from the user to post on his wall must be added to it, kindly help. Thanks