i need to authenticate before posting to my own wall, so here is my code
function get_app_token($appid, $appsecret)
{
$args = array(
\'grant_type\' => \'c
you can get access_token from session array of facebook object directly.
$session = $facebook->getSession();
$session['access_token'];
of course you need to be authorized. if session is not set you must redirect to loginUrl
$facebook->getLoginUrl(array('req_perms' => 'email,read_stream,publish_stream'));
// this will return url for your authorization
and request permission you need.