Skip to:
Content
Pages
Categories
Search
Top
Bottom

New FB Autoconnect Plugin for WP…will it work with MU/BP?

Viewing 25 replies - 26 through 50 (of 105 total)
  • @justin_k

    Participant

    Can I request that we move this discussion to my plugin homepage’s comments? It’s much easier to get notification everytime someone replies, and then other users of the plugin will be aware of it too :P

    @r-a-y

    Keymaster

    @justin_k

    Participant

    Still much nicer to have all the discussion live on the plugin page (which is linked to from the download page on wordpress and the admin panel, so it’s where users will go for support usually) :P

    @modemlooper

    Moderator

    This plugin does not work on BP 1.2 WP single 2.9.2…. tested logging into somebodies link above and the same thing happens

    Logs in fine but user links redirects to homepage.

    Also it creates a funcky username that will wreck BP’s @mentions system

    @peterverkooijen

    Participant

    This looks really slick!

    How does this work? Will users logging in with their Facebook login be added to the members database? Will Facebook logins be “mapped on” existing users or will it create double member registrations?

    I’ll try on a test installation, but not sure how to test everything without creating test Facebook accounts etc…

    EDIT:

    Oops, should have read the plugin page:

    # No user interaction is required – the login process is transparent to new and returning users alike.

    # Existing WP users who connect with FB retain the same local user accounts as before.

    # New visitors will be given new WP user accounts, which can be retained even if you remove the plugin.

    This sounds too good to be true! :-)

    @gregfielding

    Participant

    Peter,

    On my site, existing users are mapped with no problems. New user accounts are still a bit funky, but Justin is working on it and it looks like Andy is weighing in.

    I’m having a hard time testing as well…it’s a pain to try and make more facebook accounts.

    We’ll have to test on each other’s sites i think…

    @peterverkooijen

    Participant

    Yes Greg, lets do that. My testing site is here. The plugin will probably be added tonight. Anybody who wants to test logging in with their Facebook account is very welcome to until April 1st. The users database will eventually be deleted.

    I have custom code that adds new members to a mailing list and synchronizes the real name to wp_usermeta etc. I’d probably have to add that code to the plugin somewhere, right? Or does the plugin feed the registration data back through the regular BP process as if it came from the signup form?

    @justin_k

    Participant

    I’ve always tested with just two FB accounts: my admin account, and one other. You can use phpmyadmin to delete the usermeta manaully if you want to force the plugin to match by email hashes, or delete the WP account entirely if you want to simulate a first-time login.

    @gregfielding

    Participant

    I’ve got version 1.0.8 with buddypress filters acvitated on my site if you guys want to try it. http://housingstorm.com

    …scratch that…bug…gimme 10 mins :)

    @justin_k

    Participant

    You need to delete the buddypress filters you’ve added manually, which are resulting in double-buttons :P

    @gregfielding

    Participant

    Done…try now.

    @justin_k

    Participant

    Looks good – although you should delete all existing FB_xxxx accounts so we can see if they get created using Andy’s filter (or the user profile links still won’t work)

    @gregfielding

    Participant

    Deleted…

    @jamesmarsland

    Participant

    @gregfielding I get the same problem as Modemlooper on your site and on my site leckhamptononline.co.uk. Users are created fine but the member links to their name not their username, so clicking on the member name redirects to the home page, not the user profile.

    @justin_k

    Participant

    Hmm…yeah this seems to still not work. I don’t have a BP install to debug on, so I’ll leave this one up to Andy – now that there’s a BuddyPress.php file for bp-specific filters, it’ll be easy to stick in whatever filters are needed once someone figures it out :)

    @peterverkooijen

    Participant

    Users are created fine but the member links to their name not their username, so clicking on the member name redirects to the home page, not the user profile.

    That sounds like it has to do with how the real name/display name and username are stored in xprofile, wp_users and wp_usermeta, which is a mess in default BP. My custom synchronization code would probably fix that, if I can figure out where to add it in the plugin.

    Do the Facebook logins even have a username – lowercase, one word? Would you have to generate one, from the full name? Doesn’t the plugin do that?

    Apologies if I’m off base. Haven’t even tested myself yet.

    @gregfielding

    Participant

    @justin_k

    Seems like most of the issues are around usernames….is it worth considering having a field to enter a new username as a part of the authentication?

    Everything else…full names, avatars, friends, etc…could still transfer over as we continue to build this out.

    @justin_k

    Participant

    Greg: No, I definitely wouldn’t want to hassle the user with typing something in manually – the main purpose of this plugin was to make it all seamless, so they can just click “login” and they’re in. As soon as they start having to do stuff by hand it starts going way off-base :P

    @Peter: See the discussion here, starting on comment 60: http://www.justin-klein.com/projects/wp-fb-autoconnect

    @peterverkooijen

    Participant

    Thanks justin_k. The discussion mentions this function from “Andy”:

    <?php
    function bp_fbconnect_modify_userdata( $userdata, $userinfo ) {
    $userdata = array(
    'user_pass' => wp_generate_password(),
    'user_login' => $fbusername,
    'display_name' => fbc_get_displayname($userinfo),
    'user_url' => fbc_make_public_url($userinfo),
    'user_email' => $userinfo['proxied_email']
    );

    $fb_bp_user_login = strtolower( str_replace( ' ', '', fbc_get_displayname($userinfo) ) );

    $counter = 1;
    if ( username_exists( $fb_bp_user_login ) ) {
    do {
    $username = $fb_bp_user_login;
    $counter++;
    $username = $username . $counter;
    } while ( username_exists( $username ) );

    $userdata['user_login'] = $username;
    } else {
    $userdata['user_login'] = $fb_bp_user_login;
    }

    return $userdata;
    }
    add_filter( 'fbc_insert_user_userdata', 'bp_fbconnect_modify_userdata', 10, 2 );
    ?>

    Where should I add this? Does this use ‘firstnamelastname’ as username and check for doubles? Does it synchronize and update all the fields in wp_users, wp_usermeta and xprofile?

    Usernames like this, ‘community.net/members/fb_100000441950350’, are really not acceptable imho.

    Where is the query that actually stores the new user data in the database? Is it in the plugin or does the plugin send data back to WP/BP files? I also need to that data stored in mailinglist tables.

    @justin_k

    Participant

    All buddypress-specific code goes in Buddypress.php, which gets included if the “Include Buddypress Filters” option is checked.

    As far as what Andy’s specific function does or what you need to do, that’s your job :P The plugin works in WordPress, and I don’t know what specific different criteria BuddyPress introduces, nor do I have a way to test it.

    As far as how the plugin works, it’s documented pretty thoroughly both on http://www.justin-klein.com/projects/wp-fb-autoconnect and in its comments (you can ignore the adminpanel code which is obviously not *functionally* relevant…just for setting settings).

    @peterverkooijen

    Participant

    @justin_k, I don’t really expect answers to anything. I often post to keep track of what I’m doing, hopefully in a way that will help others trying to do the same thing. I’ll try this tonight and post back.

    @justin_k

    Participant

    Sure thing~

    @apeatling

    Keymaster

    I’ve just made some changes to the plugin that provides better BP support. Justin – the link to the code is on the blog post in the comments.

    This fixes the username issue.

    @peterverkooijen

    Participant

    Excellent. Downloaded [snip]. Will test that one tonight.

    @modemlooper

    Moderator

    Used Andy’s version and it works great.

    test it over here http://tempsg.com/buddypress

Viewing 25 replies - 26 through 50 (of 105 total)
  • The topic ‘New FB Autoconnect Plugin for WP…will it work with MU/BP?’ is closed to new replies.
Skip to toolbar