fbinit
Example Output
I wrote this small function for websites that lightly integrate facebook with their website such as using facebook connect. Simply call this function before calling any "fb:command" to initalize the facebook js. It will ensure fb connect is only initialized once.
  1. This should be loaded into your Application.udf library.
  2. Easy to remember and ensure your fb: calls work properly.
        
Source code <div> I wrote this small function for websites that lightly integrate facebook with their website such as using facebook connect. Simply call this function before calling any "fb:command" to initalize the facebook js. It will ensure fb connect is only initialized once. <ol> <li>This should be loaded into your <b>Application.udf</b> library.</li> <li>Easy to remember and ensure your fb: calls work properly.</li> </ol> <!--- Usage Example ---> <cfoutput> #initFb(Application.Cfg._fb.AppId)# <ul> <li><fb:login-button onlogin="location.reload(true);" perms="user_birthday,email"></fb:login-button></li> <li><fb:like send="true" width="450" show_faces="true" /></fb:like></li> </ul> </cfoutput> </div> <!--- UDF Code ---> <cfscript> function initFb(AppId) { if ( isDefined('Request.InitFb') ) // if initFb() already called return ''; // return empty Request.InitFb = true; return '<script src="http://connect.facebook.net/en_US/all.js"></script>' & '<div id="fb-root"></div>' & '<script>FB.init({appId: "#Arguments.AppId#", status: true, cookie: true, xfbml: true});</script>'; } </cfscript>
© 2017 usaRaydar
v.
IP:23.20.86.177 css:/assets/css/raycomweb.css?v=16021511