WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
Add SFC connect button to jquery login panel (10 posts)

  1. jjkilpatrick
    Member
    Posted 3 years ago #

    Hi

    I've recently incorporated a jquery login box on the site i'm building (http://itdrewitself.com/dev/) If you press the login at the top I'd like it to have the connect with facebook button on the login section. It currently shows up on the register section and works fine.

    Do I need to include some code from wp-login to make this work?

    Thanks

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 years ago #

    Use the SFC-Connect plugin in combination with the SFC-Login button, then put this call where you want the login button to be:
    <?php echo sfc_connect_shortcode(); ?>

  3. jjkilpatrick
    Member
    Posted 3 years ago #

    Thanks for the reply

    When I add this to my code the page won't load. Is there a piece of code that the login button ties to in wp-login.php? If there is I'm sure I could copy that over and it would show.

    Thanks

  4. jjkilpatrick
    Member
    Posted 3 years ago #

    Just noticed the code for the login button is there. It is just greyed out in firebug

    2 function sfc_login_check() {
    3 FB.Facebook.apiClient.users_hasAppPermission('email',function(res,ex){
    4 if( !res ) {
    5 FB.Connect.showPermissionDialog("email", function(perms) {
    6 window.location.reload();
    7 });
    8 } else {
    9 window.location.reload();
    10 }
    11 });
    12 }
    13

    Any ideas

  5. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 years ago #

    No, you can't just magically paste code in and have it work.

    The sfc_connect_shortcode() function will produce the code you need. I suggest that you look harder making that work.

    BTW, you should not be seeing the sfc_login_check code anywhere but on the wp-login.php page. If you are seeing it elsewhere, then you are doing something very, very wrong. All login functions have to pass through wp-login.php. You can't just reproduce the form elsewhere and expect it to still work. That's not how WP or HTML or PHP works.

  6. jjkilpatrick
    Member
    Posted 3 years ago #

    I guess I will have to reinstall the plugin as the shortcode has never worked.

    In regards to copying over the code that was simply a suggestion and wanted some input.

  7. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 years ago #

    Reinstalling the plugin won't change anything. It's not like some special kind of magic happens on the installation or something. Nothing happens on installation. The plugins get put onto the site. That's it.

    Why does everybody think "reinstalling" is some kind of magic cure all? Reinstalling never solves anything, you have to sort out what the problem you're having actually is.

    If the shortcode isn't working, then you need to figure out why. Is the plugin not activated? Does it create an error message? Does it just say "Connect to Facebook" in text instead of outputting the button?

  8. jjkilpatrick
    Member
    Posted 3 years ago #

    The base plugin is activated. The connect with facebook button works fine with the comments form as does the like button.

    I've inserted the shortcode into my index.php just after <?php the_content('Read more'); ?>

    I don't get any code showing up in firebug at all or any errors

  9. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 years ago #

    Try <?php echo sfc_connect_shortcode(); ?>.

    My bad. I forgot the echo.

  10. ihatemorning
    Member
    Posted 3 years ago #

    Hello,

    I want to install your plugin on a wordpress which template is Instant Q&A. The problem is that the login page is not wp-login.php but an other. My question is how can I put the login button? It is the same problem with the sign up page.
    Could you help me?
    I have the same issue with Simple Twitter connect.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic