Posting on facebook wall from flash

Hi.

I try to teach a tiny Flash App to post on a users Facebook wall, but I can’t get it to work. When the App tries to post there, I get a… what was it, I think a 2032 error, meaning that either my App doesn’t have the required permissions, or the URL it tries to post to is incorrect.

I checked the Settings of the App on my account, and there is noted “this app may post status updates, notes, photos and videos in your name”, so that shouldn’t be the problem. So I see only two other possible causes: either something having to do with that access token thingy (though I thought that my app got that automatically when checking if the user has logged in and has granted the required permissions), or something is wrong with the URL.

So, here is the Code. If anyone got any idea, please reply. I’m sitting on this for far too long, scratching my head and trying to find the error. The textfield is just so I got some feedback what’s working and what isn’t. The permission stuff is done in the html file the swf file is embedded in.

Thanks for reading.

private var ag:TextField = new TextField();
        private var user:String = "";

        public function pt() {
            // constructor code
            
            ag.width = 550;
            ag.height = 400;
            addChild(ag);
            
            ag.text = "constructor
";
        }
        
        
        public function Main() {
           Facebook.init(myAppID, handleLogin);
            ag.appendText("
init");
           
        }
        
        private function handleLogin(response:Object, fail:Object):void {
            if (response == null){
                ag.appendText('
To use this function, you have to log in into facebook.');
                }
            else {
                ag.appendText("
logged");
                loadMyInfo();
            }
        }
        
        private function loadMyInfo():void {
            Facebook.api('/me', onMyInfoLoaded);   
        }
        
        function onMyInfoLoaded(response:Object,fail:Object):void {
            user = response["id"];
            ag.appendText("
id: " + user);
             post()
        }
        
        public function post():void {
            var values:Object = {
                name:"This is my title",
                link:"http://google.de",
                picture:"http://www.kbwn.de/assets/images/AstigmatismuisTest-xx.gif",
                caption:"this is a caption",
                description:"this is a long description",
                message:"This is a test message. There are many like it but this one is mine.",
                actions:
                {
                    name:"Crazy extra thing",
                    link:"http://google.de"
                } 
            }; 
            ag.appendText("
posting");
            //Facebook.api(user + "/feed", handleSubmitFeed, values, URLRequestMethod.POST);
            Facebook.api("/me/feed", handleSubmitFeed, values, URLRequestMethod.POST);
        }
        
         private function handleSubmitFeed(success:Object, fail:Object):void {
           ag.appendText("
done posting");
           //ag.appendText("
st: " + success.text + "
ft: " + fail.text + "
s: " + success + "
f: " + fail);
           ag.appendText("
s: " + success + "
f: " + fail);
        }