Post to wall of Facebook Fan Page as Fan Page User

Nov 19, 2009 at 9:10 PM


I have the following setup:

1. Facebook User Account "A"
2. Fan page created under User Account "A"
3. Facebook Application
4. Infinite Session Key created for User Account "A"

I've been able to use the PHP API in conjunction with my infinite session key for the User Account "A" to post to the Fan Page Wall.  However, when I post to the wall it shows the poster as User Account "A", when in fact, I'd like it to show the poster as the Fan Page account.  Is there any way to accomplish this?

Basically, when I call this line:

streampublish(message, attachment, null, targetId, userId)

If I make targetId = to my fan page Id, and userId = to my User Account "A", then it posts successfully but shows the poster as User Account "A".

If however I do the same thing above but use a userId = to my fan page Id (same as targetId), it gives me a permission denied error.  I'm not sure how I need to configure the permissions to allow me to post to the fan page as the fan page itself.

Thanks in advance,

Nov 20, 2009 at 9:03 PM

stream.publish(message,nothing,nothing,nothing,pageId) works for me.

Dec 23, 2009 at 12:05 AM

I have tried the same approach and get a permissions error too. Did you ever get this figured out? I tried 


                    response ="has just posted a new contest! Click the link below to participate.", null, new List<action_link>() {
                        new action_link() { text = SurveyName, href = strAppLink }}, TargetWallID, long.Parse(TargetWallID));



Jan 9, 2010 at 4:51 PM

I am having the same problem, but I am getting a different error.

postid = FBserv.Api.Stream.Publish("Hello World Posted from my app", null, null, null, pageID);

Error:  Facebook.Utility.FacebookException: A session key must be specified when request is signed with a session secret

Looking into the source for the facebook dll it seems the session key is only added if the uid is 0.  This creates a problem when trying to write to a wall as the wall.  I tried modifing the facebook dll source code to test my theory, but I can't load the project properly through vs2008 (not sure why???).


The permission error message is due to the page not having rights to publish to itself (seems stupid but this is the way facebook set it up).  When logging in using the connect URL make sure to request offline access and publish stream rights, this will bring up a rights page after logging in.  The first page will have a drop down box make sure to check all the pages in the drop down box.  This should fix the permission error.

Jan 26, 2010 at 11:01 PM
Edited Jan 26, 2010 at 11:02 PM

This is my issue!  Steve you have nailed it.  I have spent all day on this thing.  Is there a resolution to this yet?

Jan 27, 2010 at 3:21 PM

Still nothing on this here.  Steve.  I have tried the de-authorization technique by removing the app from my facebook account, then using my software to re-connect using the app again and having it prompt for permissions.  I don't see any drop down that allows you to choose all pages.