Thursday, November 18, 2010

Advanced Stroke Life Support



To get the control to invite facebook friends in a normal page, we must first add the following namespace in the html:

\u0026lt;html xmlns = "http://www.w3.org/1999/xhtml " xmlns: fb =" http://www.facebook.com/2008/fbml ">

script with the following window will appear the facebook invite,

/ / This variable is to control the
size var popup = FB.UIServer.Methods oldSize ["fbml.dialog."] size;
FB.UIServer. Methods ["fbml.dialog."] size = {width: 760, height: 150};
/ / This variable controls the FBML code to show popup with invite
var dialog = {
                           method: 'fbml.dialog',
                                    display: 'dialog',
                   FBML "\u0026lt;fb:fbml> \u0026lt;fb: request-form action = 'http://dotnetjuliocesar.blogspot.com/' method = 'GET' invite = 'true' type = 'DotNet Julius Caesar. " content = "Visit this blog http://dotnetjuliocesar.blogspot.com/ 'label =' Visit '> \u0026lt;fb: multi-friend-selector showborder =' false 'actiontext =' Invite your friends to view this blog. '> \u0026lt;/ fb: request-form> \u0026lt;/ fb: FBML> ",
                           width: 700,
                                    height: 150
                       };
/ / Display the dialog
FB.ui (dialog, function (result) {console.log (result);});

/ / Change the size to no space on the FB.UIServer.Methods
invite ["fbml.dialog."] size = oldSize;
this script can be put inside a javascript function thus leaving a way to control the appearance of the window, for example:

\u0026lt;a id = "DivInvite" href = "#" onclick = "invite (); " style =" display: none "> Invite your friends! \u0026lt;/ a>

The end result will be something like this:

0 comments:

Post a Comment