Can the current Facebook Javascript SDK work with older Facebook API library?
Right now there is code to load the current Facebook Javascript SDK by:
window.fbAsyncInit = function() {
FB.init({appId: '218565466928', status: true, cookie: true,
xfbml: true});
};
// [...] initialize it
And there is code to use the old Facebook API by
init_fb_connect('Connect', 'XFBML', :js => :jquery, :app_settings=> '{ifUserNotConnected: fb_user_not_connected}' ) do
which is the Facebooker
Rubygem. Can they work together somehow? If I have both, then the newly added "Like" button won't work. If I remove the older Facebooker code, then the "Login with Facebook" and "Share" button won't work. Any ideas?
Update: the older code do things like:
<a class="facebook-connect-link " href="#"
onclick="; FB.Connect.requireSession(fb_after_connect, null, true); return false;"
rel="nofollow">Sign in with Facebook</a>
and
<a href="#" onclick="FB.Connect.streamPublish('', {'name': 'Some product name' ...
and
$('.login-button').each(function() {
FB.XFBML.Host.addElement(new FB.XFBML.LoginButton(this));
})
Converting the JavaScript API is relatively easy. I am not sure how much your server side will be affected though. Here are the basic methods that you would probably need:
If you don't want to convert to the new API then you can embed like button as iframe. Sooner or later you would have to convert your project anyway so might as well do it now.