views:

217

answers:

0

The dependency graph of the Facebook libraries described in the FB_RequireFeatures documention specifies that XFBML is dependent on Connect, but not vice versa.

The suggested usage they give is something like this to fire an event handler for a login button.

FB_RequireFeatures(["Connect"], function() {
   FB.init("API_KEY", "xd_receiver.htm");
   FB.Connect.requireSession();
});

In practice, this appears to load a 6Kb Connect.js file, followed by a 61Kb XFBML javascript file. I imagine this loading is being done by FB.init, which is the same function used to load and initialise XFBML.

Since I'm only using the Connect js and NOT XFBML, is there a different way of initialising the library with the API key that correctly loads just the connect features?

I am aware of the Alpha Open Source Facebook libraries that state granular lazy loading of features works, but has anyone managed to avoid loading the XFBML js with the existing non-alpha libraries? (I'm just not masochistic enough to run Alpha software in a production environment.)

related questions