Creating a Facebook API Client

Nov 18, 2008 at 11:31 PM
Edited Nov 18, 2008 at 11:33 PM
For the past week, I've been attempting to piece together information from Facebook's documentation, Facebook.NET, and as many articles as I can find on the cause. But I've been nothing but frustrated the whole time. Frustrated at facebook for making things difficult with respect to the limitations on who, what, when and where, and I also can't seem to find a definitive documentation source on the objects in this framework.

So as a last resort, I'm yelping for a helping! :) Here's my end: I wrote a blogging engine, and I'm attempting to give my users the opportunity to update their facebook mini feed (FeedStory object, I assume) when they post a new blog entry.

The sample feed text would be: "[user] has posted a new blog entry [entry title] at [url]." That's it. nothing 'tricky', considering it took me .5 hours to do this with Twitter's API.

Here's what I've done:
- Found out that you can't authenticate for the user by having them supply their username/pw for facebook.
- Created an application with facebook, api key and secret.
- Registered it as a web application, only to find out, I don't want to write a user tool for facebook, but use the one they already have (mini feed)
- Found some articles on creating a 'permanent session id' by having the user request it from http://www.facebook.com/code_gen.php?v=1.0&api_key=[api key] But this confuses me, because I don't know if they're authenticating to me, or to facebook with that session id.
- Attempted to create a session object, and use that to post message to a mini feed.

And that's where I'm at. Everything I try doesn't seem to work. I can create a successful session object (Facebook.Service.FacebookService faceBookService = new FacebookService(key, secret)), but whatever I do to it from there doesn't work. I've been looking at Session.GetLastResponse() and most of it has to do with 'valid sessions', etc.

I would really appreciate some direction as to what I could use to make this possible, if at all. Thanks in advance!