jfb_output_facebook_instapopup

As an alternative to jfb_output_facebook_btn, this will setup an event to automatically popup the Facebook Connect dialog as soon as the page finishes loading (as if they clicked the button manually).

Description

jfb_output_facebook_instapopup( (int) $callbackName = 0 ); 

Parameters (1)

0. $callbackname (int)
The callbackname.

Usage

  1. if ( !function_exists( 'jfb_output_facebook_instapopup' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-fb-autoconnect/Main.php'; 
  3.  
  4. // The callbackname. 
  5. $callbackname = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jfb_output_facebook_instapopup($callbackname); 
  9.  

Defined (1)

The function is defined in the following location(s).

/Main.php  
  1. function jfb_output_facebook_instapopup( $callbackName=0 ) 
  2. global $jfb_js_callbackfunc; 
  3. if( !$callbackName ) $callbackName = $jfb_js_callbackfunc; 
  4.  
  5. ?> 
  6. <script type="text/javascript">//<!-- 
  7. function showInstaPopup() 
  8. FB.login(function(response) 
  9. if (response.authResponse) 
  10. <?php echo $callbackName?>(); 
  11. else 
  12. alert("Sorry, you must be logged in to access this content."); 
  13. });  
  14. //--></script> 
  15. <?php