Title: Call to undefined function fb_login_button()
Last modified: August 20, 2016

---

# Call to undefined function fb_login_button()

 *  [wwalker](https://wordpress.org/support/users/wwalker/)
 * (@wwalker)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/)
 * I am using elegant themes – askit theme.
    on this page [http://forum.ourcalling.org/?page_id=460](http://forum.ourcalling.org/?page_id=460)
   i have embedded the code `<?php fb_login_button(); ?>` to embed the facebook 
   connect button. The actual theme page is “page-login.php”
 * Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170644)
 * Try sfc_connect_shortcode instead. Also, activate the sfc connect widget.
 *  Thread Starter [wwalker](https://wordpress.org/support/users/wwalker/)
 * (@wwalker)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170655)
 * ok – that works, but it doesn’t take the user anywhere. It just reloads the same
   page without any redirection.
    Also, and as in previous comments from other users
   the button always says “connect with Facebook. How will the user know that they
   are connected?
 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170668)
 * You also have to have the sfc-login plugin enabled. Then it will log them in,
   as per normal.
 *  Thread Starter [wwalker](https://wordpress.org/support/users/wwalker/)
 * (@wwalker)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170691)
 * Yes Otto, it is working and the user is logging in. But they don’t know that 
   they are logged in. Because nothing changes on the page, and it appears as though
   clicking the “connect with Facebook” only reloads the page, how will the users
   know they are logged in?
    I have users clicking over and over again on that button
   expecting to be redirected to the home page (as though they are now logged in)
   or a status to change to let them know that they ARE logged in.
 *  Thread Starter [wwalker](https://wordpress.org/support/users/wwalker/)
 * (@wwalker)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170696)
 * Can I add something to this to make a successful login always redirect to the
   home page?
 *     ```
       function sfc_connect_shortcode() {
       	$login ='<fb:login-button perms="email" v="2" size="medium" ';
   
       	if (function_exists('sfc_login_activation_check')) {
       		$login .= 'onlogin="window.location=\''. wp_login_url() . "?redirect_to='+document.URL;\"";
       	}
   
       	$login .= '><fb:intl>'.__('Connect with Facebook', 'sfc').'</fb:intl></fb:login-button>';
       	return $login;
       }
       ```
   
 *  Thread Starter [wwalker](https://wordpress.org/support/users/wwalker/)
 * (@wwalker)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170763)
 * I’m sure you get tons of emails everyday so I’ll try to reword my question to
   make it clear.
 * Is there a way to force a redirect (to the homepage) after a successful FB login
   connection?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Call to undefined function fb_login_button()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-facebook-connect_a9b9c1.svg)
 * [Simple Facebook Connect](https://wordpress.org/plugins/simple-facebook-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-facebook-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-facebook-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-facebook-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-facebook-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-facebook-connect/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [wwalker](https://wordpress.org/support/users/wwalker/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-fb_login_button/#post-2170763)
 * Status: not resolved