This project is read-only.

error-"The user hasn't authorized the application to perform this action" while posting on page


Hi All,
Using facebooktoolkit i am able to post on the user's wall. But i am not able to post on the page which is administered by that user.
My code is as below-
Facebook.Session.ConnectSession connectsession = new Facebook.Session.ConnectSession(APIKey, AppSecret);
        Facebook.Rest.Api api = new Facebook.Rest.Api(connectsession);

        api.Session.SessionKey = Auth_token;
        api.Session.UserId = UserId;
        Facebook.Rest.attachment_media_image myimage = new Facebook.Rest.attachment_media_image();
        //href is the link for the image if you click on it
        myimage.href = "";
        myimage.src = "";
        List<Facebook.Rest.attachment_media> mymedia = new List<Facebook.Rest.attachment_media>();
        Facebook.Rest.attachment myattachment = new Facebook.Rest.attachment();
        //name is bold heading for entry, to right of image = "Title of your post by";
        //href is the link target for the 'name'
        myattachment.href = "";
        //caption is the long article text below the name
        myattachment.caption = "Here is the main message for the wall/stream post";
        //description appears under image
        myattachment.description = "Something to describe the image";
 = mymedia;
        IList<Facebook.Schema.action_link> myactionlinks = new List<Facebook.Schema.action_link>();
        Facebook.Schema.action_link myactionlink = new Facebook.Schema.action_link();
        myactionlink.href = "";
        myactionlink.text = "Description for hyperlink";
        //my page
        api.Stream.Publish("", myattachment, myactionlinks, "", UserId); //throws error
I have generated the access token for user(with manage_pages,offline_access,publish_stream extended permissions) and based on that access token, i am making the accounts connection (<user_access_token>) to get the access token for the user administered page on facebook. this call successfully returns me the access token for that page.
Now i am using the same code and the access token returned from accounts connection to post the message on that page's wall.
But call throws error - "The user hasn't authorized the application to perform this action"
I need to get this error resolved as soon as possible for my client, So can anyone please help me out?


alpsds1980 wrote Jan 3, 2011 at 8:08 PM

Hi All,

Is there anyone who can help me resolve this issue ? I am really stuck and not able to find a fix to this issue.
Any help will be highly appreciated.


ntotten wrote Jan 7, 2011 at 8:15 PM

I would recommend switching to the Facebook C# SDK ( As you may have seen, this project has been discontinued.

nouka wrote May 29, 2011 at 8:39 PM

have u manged to solve this.
I'm having the same problem even from the test console :(

wrote Feb 22, 2013 at 12:37 AM