bbPress Plugin Browser »

Simple Facebook Connect (1.0.3)

Download

Version: 1.0.3

Last Updated: 2011-4-3

Requires bbPress Version: 1.0 or higher

Compatible up to: 1.0.3

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(2)

Your Rating

Author: moogie

Adds a single-click seamless Facebook Connect -based registration/login to your bbPress. The user is not bothered with anything extra, and is automatically logged in right after accepting the Facebook authorization popup.

DEMO SITE: http://moogie.idle.fi/bbpress-demo/

Very simple installation, at minimum only two changes required on your blog:

  • edit the theme header.php, and add the facebook xmlns param to the <html> tag
  • edit the theme, and place <?php fb_login_button(); ?> where you want the login button to appear

A Facebook Application ID and Secret is obviously required, as the Facebook Connect requires these.

Other features:

  • Facebook Avatars are displayed automatically (if avatars are enabled in your bbPress settings)
  • No unnecessary registration email spam is sent to the user.
  • Disables password edit for facebook connected users; the random password assigned to the account is never used
  • Select how users Display Name is set from Facebook (Full Name, First Name or Last Name)
  • (optional) Disables profile edit for facebook connected users
  • (optional) Request users email address from facebook. If disabled, a dummy email is set for the user.
  • (optional) Hide "You must login" from post form, which leads to the traditional login form. This would confuse Facebook Connected users, as they cannot login traditionally.
  • Select how to initialize Facebook Javascript SDK - automatically (when needed), always or never. Can solve conflicts with other plugins/themes using the Facebook SDK.

  1. Opes

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    Hi. This plugin looks really promising, but I do have one problem. When I try to activate it I get the following error:

    Fatal error: Cannot redeclare class FacebookApiException in /*/bb-plugins/simple-facebook-connect/facebook.php on line 91

    Any ideas on how to fix it?

    Posted: 1 year ago #
  2. Opes

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    Okay, managed to fix it by changing require('facebook.php'); to:

    if (!class_exists('FacebookApiException')) {
    include_once('facebook.php');
    }

    But I am having a problem logging back in, I get the error:

    Error: an user account with the email address 'myemailaddress' already exists.

    Back to forum.

    Posted: 1 year ago #
  3. Opes

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    Sorry for the flood, but it also seems to create many identical users in the user table, with just a higher number at the end in the username every time someone logs back in.

    Posted: 1 year ago #
  4. Thanks Opes, I didn't think of conflicts with many plugins loading facebook.php. I'll add your fix to the next version.

    What version of bbPress are you running? I honestly don't know about the backwards (or forwards) compatibility, I've only tested with 1.0.3 myself.

    I can think of only one way that something what you describe could happen, and that is if bb_update_usermeta() does not update the users facebook ID to the bb_usermeta table.

    If you can do SQL, output of "select * from bb_usermeta where user_id = x" (where x = a user id of a user created by this plugin) would help.

    Posted: 1 year ago #
  5. Opes

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    I have WP and BB user integration, so this is the output from wp_usermeta:

    umeta_id user_id meta_key meta_value
    148 17 bb_capabilities a:1:{s:6:"member";b:1;}
    149 17 facebook_id 0123456789 // fake number, but correct
    150 17 first_name John
    151 17 last_name Johnson

    Posted: 1 year ago #
  6. Opes

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    Okay, got it working.
    The plugin does not seem to play well with the wp/bb integration. I changed:

    $bb_userid = $bbdb->get_var("SELECT user_id FROM ".$bbdb->prefix ."usermeta WHERE meta_key = 'facebook_id' AND meta_value = '".$fb_id."'");

    to:

    $bb_userid = $bbdb->get_var("SELECT user_id FROM "./* $bbdb->prefix .*/"wp_usermeta WHERE meta_key = 'facebook_id' AND meta_value = '".$fb_id."'");

    If you could get it to detect weather you have wp_usermeta or bb_usermeta in next release that would be cool :).
    Thank you, great first release, great plugin, just what I needed :).

    Posted: 1 year ago #
  7. Thanks Opes, will definitely look into that :)

    Posted: 1 year ago #
  8. Just posted version 1.0.2. If you are using the plugin, I'd recommend to upgrade, as the old version did not properly handle users who had a Facebook ID >= [signed 32bit int] if bbPress was run on a 32bit PHP. Accounts for such users would need to be deleted, and the users need to login again.

    Posted: 1 year ago #
  9. Skwigly

    Member

    The facebook login button does not work if you place a XFBML facebook like button on the same page.

    Any suggestions for that?

    Posted: 1 year ago #
  10. How are you adding the Like button? Using some other module?

    The button itself should not conflict with the Login button in any way. A conflict can happen if you have another module which also initialized the Facebook Javascript SDK: in this case, you need to use option to disable the initialization from this (or the other) plugin.

    Posted: 1 year ago #
  11. güzel çalışma.

    Posted: 1 year ago #
  12. I've followed the installation steps perfectly, but just get this when I try to 'Login with Facebook':

    Forbidden
    You don't have permission to access / on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    --------------------------------------------------------------------------------

    Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at http://www.hoopbot.com Port 80

    Posted: 1 year ago #
  13. yadavmahesh

    Member

    I am a newbee. The following error is coming

    Parse error: syntax error, unexpected '{' in /nfs/c04/h06/mnt/84423/domains/noneoftheabove.in/html/forums/bb-plugins/simple-facebook-connect/connect.php on line 36

    Do i need to install any other plugin like 'Avatar Upload' to make this plugin work. Kindly guide ?

    Posted: 1 year ago #
  14. yadavmahesh: you need PHP5 to use this plugin. Based on the error, I'd say your host has PHP4.

    hugobrook: i'm sorry, I have no idea.

    Posted: 1 year ago #
  15. Thanks for looking anyway :)

    Posted: 1 year ago #
  16. Nice plugin!

    Posted: 1 year ago #
  17. hi, i got a question, i'm adding bbpress on a running wordpress site, i already have a facebook app running on the blog too, and set the app to recognize everything from the same domain.

    i'm not quite sure what did you mean by these :
    "edit the theme header.php, and add the facebook xmlns param to the <html> tag " is it the login button with the pic ?

    i tried to put it, but and it shows i'm already connected to the blog since it's still in the same domain, but i can't post yet, haven't figure out where i went wrong though.

    and when i tried to put the "<?php fb_login_button(); ?> " it doesn't seem to work..
    does it have to do with the wp integration ? i think i might have said yes to it when i installed bbpress.

    Posted: 1 year ago #
  18. mattsich

    Member

    Can you please please please add a logout button? because so far I can log in.. but can't log out =(

    Posted: 10 months ago #
  19. Hey ,

    Initially there was a problem with facebook error :
    Missing redirect_uri parameter.
    Got that fixed by changing the url while registering app in facebook to the templates directory.

    Now getting error:-Facebook Connect failed

    This comes after loggin-in before redirecting to my homepage

    Posted: 10 months ago #

RSS feed for this topic

Add a Comment »

You must log in to post.