WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
Call to undefined function fb_login_button() (7 posts)

  1. wwalker
    Member
    Posted 3 years ago #

    I am using elegant themes - askit theme.
    on this page 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?

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 years ago #

    Try sfc_connect_shortcode instead. Also, activate the sfc connect widget.

  3. wwalker
    Member
    Posted 3 years ago #

    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?

  4. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 years ago #

    You also have to have the sfc-login plugin enabled. Then it will log them in, as per normal.

  5. wwalker
    Member
    Posted 3 years ago #

    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.

  6. wwalker
    Member
    Posted 3 years ago #

    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;
    }
  7. wwalker
    Member
    Posted 3 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic