您的代码中需要 *publish_stream* 权限。有可能:
$my_url = "http://apps.facebook.com/siegiusarena";
// 获取用户 ID $user = $facebook->getUser();
如果($用户){
$message=$application_name." game on facebook. Check it out: http://apps.facebook.com/siegiusarena";
$link = "http://apps.facebook.com/siegiusarena";
$attachment = array('message'=>$message, 'link'=>$link, 'picture'=>'http://www.developas.com/fb/siegiusarena/siegiusarena_256x256.jpg');
$facebook->api("me/feed", 'post', $attachment);
}else{ $code = $_REQUEST["code"];
if(empty($code)) {
$_SESSION['state'] = md5(uniqid(rand(), TRUE)); // CSRF protection
$dialog_url = "https://www.facebook.com/dialog/oauth?client_id="
. $appid . "&redirect_uri=" . urlencode($my_url) . "&state="
. $_SESSION['state'] . "&scope=email,publish_stream";
echo("<script> top.location.href='" . $dialog_url . "'</script>");
} }