views:

636

answers:

2

I have been looking into using facebook connect for a new web site I am building, however the facebook api seems to be a little flaky.

Th code I have been using is basic, however the example application 'therunaround' suffers from similar issues.

E.g. friends list does not always load, logged in fb user not always detected.

Are these issues purely because I am just starting out?

+2  A: 

Yes, the problems you describe are likely just due to not using the API correctly.

Facebook Connect is still very new and does suffer from occasional problems, but in general it is pretty stable and is being implemented by many major sites.

This developer post may be relevant to your problem: (From: http://www.facebook.com/developers/message.php)

Please make sure features are loaded before using Facebook Connect JS APIs Feb 26, 2009 1:35pm

Almost all Facebook Connect's JS APIs are loaded asynchronously after calling FB.init(). Because of the asynchrous nature, the JS APIs are not necessaryly available immediately after making these calls. You should use FB.ensureInit or FB.Bootstrap.requireFeatures to ensure the JS APIs are loaded before using them.

We have a wiki documentation that describes this in more detail. However, we just found out that some Connect apps were calling Connect JS API such as FB.Connect.* and FB.Facebook.* immedidately after calling FB.init. This approach would cause intermittent failures because the functions may not be loaded yet.

Pior to last night's push, we fixed a bug in our FeatureLoader.js.php where it was always automatically staring the asynchourous loading of Connect features. After the bugs is fixed, code that were calling JS API before making they are loaded are more likely to fail. If you noticed that your Connect apps are getting function not defined erros for Connect JS functions, please check your code to make sure it is waiting for features to loaded before using them.

Gdeglin
+4  A: 

I've implemented some sites with Facebook connect. The short answer is yes; it's flaky. Load times can be very long, API calls often fail, images don't load, and there's the awful reality of having to use 3rd party cookies. The documentation is decent, but often dated.

You'll just have to weigh the gains you get (huge community, really cool cross-pollination, template posting, friend-linking) versus the headaches of being a FB developer. The platform is super young though and it'll be worth it to implement in the long run. I wouldn't recommend replacing a traditional user/pass system completely right now, but it's great for linking accounts and posting "wall posts" to user feeds (which is pretty easy to implement).

One of my biggest gripes with FB development is that you have to create new applications for every environment. Have a local server? Application. Have a dev server? App. The live server? Another app. Each is tied to a base domain, and there's no way to add multiple domains (though sub-domains work). You have to configure each app for each environment. Also, the fact that you can't "edit" wall templates is tough as well; you have to delete and start over as far as I know (even if you just want to correct spelling or something).

It's weird. Some aspects of FB development are an absolute JOY to work with. And some are the worst development experiences I've had.

/2¢

Typeoneerror
Thanks for sharing your experiences with FB, TypeOneError. I've recently started FB development, so it's good to know that it's not just me who finds some of it frustrating.
allyourcode
Yeah! Good luck! One of my apps should be launching next week or so. It's actually a big site for USA networks so hopefully it'll get some love in the FB Connect world.
Typeoneerror

related questions