Publish content to Facebook C#

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-04-19T15:01:06Z Indexed on 2010/04/19 15:03 UTC
Read the original article Hit count: 603

Filed under:
|

I apologize if this has already been answered, but all the information out there on Facebook publishing is so confusing and conflicting, I haven't been able to get anything to work yet. I'm trying to set up an application that runs on my local server to publish content to my organization's fan page (this will tie in with my WCMS to cross-post content). I believe I want a Facebook Connect application to do this which I've set up properly in Facebook and gotten an application key and secret. Here's the code I'm trying to execute, but each time it's run I get "User has not authorized access" even if I'm just trying to publish to the application wall.

ConnectSession fbSession = new ConnectSession("APP_KEY", "APP_SECRET");
Api fbAPI = new Api(fbSession);
fbAPI.Stream.Publish("hello world");

I've also tried:

fbAPI.Stream.Publish("hello world", null, null, FAN_PAGE_ID, APP_ID);

I've granted my application access to publish on the fan page.

© Stack Overflow or respective owner

Related posts about facebook-connect

Related posts about c#