Skip to:
Content
Pages
Categories
Search
Top
Bottom

Heres how to make bp-facebookconnect and the welcome plugin work togeather >>

  • @shedmore

    Participant

    I ran into this problem, and figured someone else might also run into it along the way…so I am writing my fix for the community:

    1. Inside bp-facebook connect (file fbconnect.php) you need to change:

    add_action(‘plugins_loaded’, ‘fbc_init_auth’, 2 );

    to this:

    add_action(‘plugins_loaded’, ‘fbc_init_auth’, 7 ); //this will ensure it loads AFTER the globals necissary for the welcome plugin to work.

    2. Then go into bp-fbconnect.php file

    And add this:

    do_action(‘fb_done_inserting’ , $user_id);

    Put that do_action (above) right above the closing bracket at the bottom of the function below (found in bp-fbconnect.php):

    bp_fbconnect_insert_data( $user_id, $usermeta) {

    ///random insert functions

    do_action(‘fb_done_inserting’ , $user_id);

    }

    3. Finally you need to add these three lines to the welcome plugin..inside the file (welcome-pack.php)

    add_action( ‘fb_done_inserting’, ‘dp_welcomepack_defaultfriend’, 1, 3 );

    add_action( ‘fb_done_inserting’, ‘dp_welcomepack_defaultgroup’, 1, 3 );

    add_action( ‘fb_done_inserting’, ‘dp_welcomepack_welcomemessage’, 1, 3 );

    Add it around the bottom of the file where the other add_actions are

    ////////////////

    If your using the bp-fbconnect plugin at all for registration/login…its prob worthwhile to do the first two steps (even if your not using the welcome plugin) — doing this will give you access to all of the bp global functions at the time of registration for any future registration style plugins you might install.

    ////Side note, you may need to consider modifications if your users can have their own blogs..in my setup, my users can register but don’t get their own blogs…so I havent tested what needs to be modified (if user blogs are allowed)

Viewing 12 replies - 1 through 12 (of 12 total)
  • @stripedsquirrel

    Participant

    Thanks, do you know what problems are actually caused when using both unmodified plugins?

    Should FB connect work when Welcome pack is turned off?

    I turned Welcome Pack off, and on my BP1.1.1 (& wpmu 2.8.4), the button appears nicely on the right of the login screen, but when clicking it I always get this FB 404 in a popup:

    “The page you requested was not found.

    You may have clicked an expired link or mistyped the address. Some web addresses are case sensitive.

    * Return home

    * Go back to the previous page”

    Maybe it is my crappy new facebookprofile that is not complete, can somebody else with a real FB account test it on http://Biketravellers.com ?

    Cheers, Harry

    @shedmore

    Participant

    Has to do with the fact that a few global variables and functions are not being loaded in the right order…ie the system tries to send out a welcome message before the BuddyPress messaging function’s globals are setup…but only when you use facebook as the registration/login mechinism

    Thats what those changes (above) take care of.

    ///////////

    Your problem sounds more like you need to set the facebook application settings. I assume you have created a facebook app on Facebook’s dev side right? Did you set the “Connect URL” in the facebook app settings to be your domain ie : http://www.yourdomain.com.

    I beleive whats happening to you would happen if thats not explicitly set.

    @stwc

    Participant

    Thanks for this — waiting for word from DJPaul on this before implementing your hacks, just in case.

    @djpaul

    Keymaster

    The only thing I am going to comment on is that FBConnect is not a very well written piece of code and as you can see from this thread, doesn’t even call all the actions that occur during normal user registration.

    @stwc

    Participant

    Bummer. I’ve been planning to use FBConnect for user signup ease-of-use, assuming that since Andy Peatling was one of the people credited with its development it was semi-rock-solidish, but if not, then maybe I ought to rethink that…

    Guess maybe I’ll try shedmore’s hacks for the moment, although I do have user blog registration enabled. I’d love to hear from anyone who has any ideas for making that bit work along with the FBConnect, too.

    @shedmore

    Participant

    DJPaul is correct – its pretty shot code, and it looks (more and more) like I am going to have to write a facebook connect module from scratch…bummer

    My suggestion above was just a way to give some suggestions on a way to hack around it rather than having to rewrite the whole thing

    I dont want to make this “fix” sound official – it clearly isnt :) – and unfortunately fixing this (as I am seeing days later) is causing some other problems….plug one hole, and sure enough the water shoots out somewhere else ;)

    So as anyone else would say, if your coding skills are limited – I would urge you to proceed with caution.

    @djpaul

    Keymaster

    To defend Mr Peatling, I believe he has just taken the existing WordPress FBC plugin and adapted it to work with WPMU/BuddyPress.

    @shedmore

    Participant

    P.S. stwc – There isnt really much Andy could have done better…its the plugins core that isnt really desinged to work with Buddypress (and Andy didnt write that).

    Andy created a single file “port” (to help the community) that amemnds certain functions to the core of the original plugin – to help “insert” data into buddypress fields. Unfortunately, becuase of the way the core of the plugin was written…there are some problems that can’t be addressed with default hooks (ie globals).

    I am going to write a post about this soon, and hopefully get some input from the community on the best way to handle the registrationn process in accounting for all of these “new” ways to register.

    HOpefully there is a solution I am not seeing

    @shedmore

    Participant

    Haha…DJPaul beat me by 30 seconds

    @bpisimone

    Participant

    Alright shedmore, you know what you got to do! :)

    @porscheheritage

    Participant

    Go Shedmore!

    @raymondmannion

    Participant

    Yeah, I’m gonna have to uninstall this plugin because of the issues. I can’t seem to log out of my wordpress site without clearing my cache or using a different browser.

    If you are persistent – you should check out the author’s step by step here:

    http://www.adambreckler.com/setting-up-facebook-connect-for-wordpress

    I took a bunch of guesses at the facebook developer plugin and got it all working, but some of the bugs are too tough for me to deal with and my users are complaining….

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Heres how to make bp-facebookconnect and the welcome plugin work togeather >>’ is closed to new replies.
Skip to toolbar