I used to have an href
in my website. When users clicked on it, a multi-friend selector showed so they could invite their friends to my website.
That was done u
The following code works for me, but please note the following:
Hope this helps :)
function fb_invite_friends() {
FB.ui({method:'fbml.dialog', display:($.browser.msie ? 'popup' : 'dialog'), size:{width:625,height:515}, width:625, height:515, fbml:' '});
}
$(document).ready(function() {
/* Facebook */
window.fbAsyncInit = function() {
FB.init({appId: fb_app_id, status: true, cookie: true, xfbml: true});
if (facebook_canvas) {
FB.Canvas.setAutoResize(4000); // Will resize the iFrame every 4000ms
}
FB.Event.subscribe('edge.create', function(response) {
// The user clicked "LIKE", so we give him more coins!
$.get(href_url, {action:'log_likes'});
});
// FBML Dialog size fix
FB.UIServer.Methods["fbml.dialog"].size = {width:625, height:515};
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
}