Overview
What Is WP-FB AutoConnect?
The simple concept behind WP-FB AutoConnect is to offer an easy-to-use widget that lets readers login to your blog with either their Facebook account or local Wordpress credentials. Although many "Facebook Connect" plugins do exist, most of them are either overly complex and difficult to customize, or fail to provide a seamless experience for new visitors. I wrote this plugin to provide what the others didn't:
- Full support for Wordpress, Buddypress, Mingle (free addon), and MultiSite (paid addon).
- No user interaction is required - the login process is transparent to new and returning users alike.
- Existing users who connect with FB retain the same local user accounts as before.
- New visitors will be given new user accounts, which can be retained even if you remove the plugin.
- Facebook profile pictures can be used as avatars, even on pre-existing comments.
- User registration announcements can be pushed to Facebook walls.
- No contact with the Facebook API after the login completes - so no slow pageloads.
- Won't bloat your database with duplicate user accounts, extra fields, or unnecessary complications.
- Custom logging options can notify you whenever someone connects with Facebook.
- A powerful set of hooks and filters allow developers to easily tailor the login process to their personal needs: redirect to a custom page, fill xProfile data with information from Facebook, setup permissions based on social connections, and more.
- Fully HTML/CSS valid.
WP-FB AutoConnect Premium
To address the needs of more advanced users, I've created an additional Premium add-on which extends the functionality of the free WP-FB AutoConnect plugin. This add-on currently provides the following:
Premium Features:
- MultiSite Support (Mouseover for more information)
- Cache Facebook avatars (Mouseover for more information)
- Require access to user's real email (Mouseover for more information)
- Auto-fill BuddyPress X-Profile fields with information from Facebook
- Announce Facebook logins on the BuddyPress Activity Stream (new!)
- Show an AJAX spinner to indicate load-in-progress after clicking the Login button
- Customize the login button's size and text (handy for localizing to another language)
- Add a Facebook button to the comment form, login form, WP registration form, and WPMU signup form
- Customize the Redirect URL for first-time visitors ("Welcome" page), returning visitors ("Welcome Back" page), and logged-out visitors ("Come back soon" page)
- Restrict autoregistration to Facebook friends, Facebook fans, Facebook group members, explicitly invited users (via Secure Invites), everyone, or no one
- Send a customizable welcome mail to autoregistered users (with their generated login and password)
- Silently handle "double-logins" (Mouseover for more information)
- Show links to connected users' Facebook profiles in the "Users" admin page
- Customize all visible text (Mouseover for more information)
- Show a 'Remember Me' tickbox
- Show the user's avatar (when logged in)
- Hide the WP login fields (leaving Facebook as the only way to login)
- Simultaneously logout of Facebook and the local blog
Important: Before making a purchase, please be sure to install and test the free plugin to confirm that it works for you; if the free version works, so will the premium:
Buy WP-FB-AutoConnect Premium (Single-Site License) - $29.99
Buy WP-FB-AutoConnect Premium (Developer License) - $69.99
Upon completing payment, you can grab the file by visiting Account -> Downloads. To install it, first setup the free version of WP-FB AutoConnect and then simply drop the purchased "WP-FB-AutoConnect-Premium.php" script into your plugins directory. This will automatically enable the premium features in your admin panel, and you may continue to update the core plugin as usual.
Screenshots
Here are some screenshots of the plugin; click each one for a larger view and description:Instructions
To allow your users to login with their Facebook accounts, you must first setup an Application for your site:
- Visit www.facebook.com/developers/createapp.php
- Type in a name (i.e. the name of your blog). This is what Facebook will show on the login popup.
- Click the "Web Site" tab and fill in your "Site URL" (with a trailing slash). Note: http://example.com/ and http://www.example.com/ are not the same.
- Click "Save Changes," and note the API Key and Application Secret (you'll need them in a minute).
- Download the latest version from here, unzip it, and upload the extracted files to your plugins directory.
- Login to your Wordpress admin panel and activate the plugin.
- Navigate to Settings -> WP-FB AutoConn.
- Enter your Application's API Key and Secret (obtained above), and click "Save."
- If you're using BuddyPress, a Facebook button will automatically be added to its built-in login panel. If not, navigate to Appearance -> Widgets and add the WP-FB AutoConnect widget to your sidebar.
Customizing
How it Works
Before getting into any advanced customization, you should have a general understanding of how the login process works. When a user clicks the login button, a Facebook form pops up, they fill in their info, it closes, and a javascript callback function redirects them to _process_login.php. This is the heart of the plugin. Here's what it does:- Access the User's Facebook account and get their uid (userID)
- Search for existing WP users tagged with this visitor's Facebook uid; whenever someone successfully connects, the plugin tags them with usermeta so it can quickly match them to their WP user account on subsequent logins. If found, this is the existing WP user we'll login.
- If nobody is found via usermeta, we search all existing users for someone with the same email address as the connecting FB member (assuming you've opted to ask them for their email). If found, this is the existing WP user we'll login.
- If nobody is found via meta or email, we assume the connecting user is a first-time visitor. We auto-create an account for them and log them in.
- Redirect the user to their previous page.
Hooks & Filters
During the login process, a number of hooks and filters provide an easy way for programmers to customize the script's behavior as needed:- Hook wpfb_prelogin runs at the very start of the login script, allowing you to perform custom actions before connecting to Facebook.
- Hook wpfb_connect runs after connecting to Facebook but before searching for a local Wordpress user, letting you access profile information but still abort the process if desired.
- Filter wpfb_insert_user is applied to userdata just before autoregistering an account, allowing you to customize new users without affecting existing ones.
- Hook wpfb_existing_user runs before logging in an existing (i.e. not autoregistered) user.
- Hook wpfb_login runs just before the login process finishes, receiving the user's Wordpress uid, their Facebook uid, and a Facebook API instance with active client session. This allows you to access and utilize social information about your visitors; see the examples below for more detailed instructions.
- Hook wpfb_add_to_form allows you to insert html into the <form> responsible for sending the user to _process_login.php. This is handy if you want to forward additional data for use during the login process.
- Hook wpfb_add_to_js lets you insert additional javascript to be executed before submitting the <form> that sends the user to _process_login.php.
- Hook wpfb_add_to_asyncinit lets you insert additional javascript after the Facebook API initializes.
- Filter wpfb_extended_permissions lets you modify the extended permissions that Facebook will prompt for. The complete list of available permissions is documented here.
- Hook wpfb_after_button lets you output custom html immediately after the Login with Facebook button.
Examples
The hook wpfb_login receives an array of 3 arguments, formatted like this:- $args['WP_ID']: The local Wordpress userID
- $args['FB_ID']: The Facebook userID
- $args['facebook']: The Facebook API instance, with active client session
add_action('wpfb_login', 'add_to_friends');
function add_to_friends($arg)
{
$myUID = '123456';
$newUID= $arg['FB_ID'];
$rsGrp = 15;
$fbArg = array('method'=>'friends.areFriends','uids1'=>$myUID,'uids2'=>$newUID);
$result = $arg['facebook']->api( $fbArg );
if( $result[0]['are_friends'] )
ScoperAdminLib::add_group_user($rsGrp, $arg['WP_ID']);
}
For information on the types of things you can pull from Facebook, refer to the API documentation here.The following is a slightly more advanced example of how you might use wpfb_add_to_js and wpfb_add_to_form to forward some custom data for use during the login process:
//Add a POST variable to be sent through to _process_login.php
add_action('wpfb_add_to_form', 'nb_connect_add_to_form');
function nb_connect_add_to_form(){
echo '<input type="hidden" name="cstm" id="cstm" value="unset" />';
}
//Before the form is submitted, use JS to set the field dynamically from a textbox
add_action('wpfb_add_to_js', 'nb_connect_add_to_js');
function nb_connect_add_to_js(){
echo "document.getElementById('cstm').value = document.getElementById('t').value";
}
//When the user connects, insert the data into their BP xprofile.
add_action('wpfb_inserted_user', 'nb_connect_add_profiledata');
function nb_connect_add_profiledata($args)
{
global $_POST;
if( !function_exists('xprofile_set_field_data') ) return;
xprofile_set_field_data('my_profile_field', $args['WP_ID'], $_POST['cstm']);
}
Custom Login Buttons
If you'd like to manually add a Facebook button elsewhere on your site, you may do so by calling the function:jfb_output_facebook_btn();Note however that this relies on two other functions which are normally auto-invoked by wp_footer, jfb_output_facebook_callback() and jfb_output_facebook_init(). If you end up with a nonfunctional button, most likely you're on a page that doesn't call wp_footer so you'll need to explicitly call one or both of these yourself.
AutoPrompting
Normally, users will initiate a login by manually clicking the "Login with Facebook" button. But what if you want to prompt them automatically, as soon as they visit a page? What if you have some private content that only friends should be able to access? Rather than manually creating user accounts and instructing them to login before viewing the content, we can use WP-FB-AutoConnect to handle it all automatically. I've included a sample script, _autologin.php, which will let you provide a link like this:http://www.example.com/autologin/192When a user visits the link, if they already have access to post 192 it'll send them straight there, and if not, it'll auto-popup a Facebook Connect window, log them in, give them access, then redirect them. No manual intervention is required by either you or the user - all they need is the link.
Note that this is a fairly advanced usage that requires a good bit of PHP knowledge; it's provided just as an example of how you can further utilize the plugin. Please refer to _autologin.php for exactly how it works.
FAQ
Note: Numbers may not be sequential as I remove old or outdated FAQs.2. The Login button isn't rendering correctly in IE.
Make sure your theme calls language_attributes() in its opening html tag.
3. The widget's layout doesn't look anything like yours.
This is a CSS issue - you'll need to style it appropriately in your theme's stylesheet. For reference, here are the rules I'm using - you can try this out, and alter it as needed:
#wp-submit{ height:23px; width:46px; padding:0; margin:0 0 0 7px; }
#user_pass{ height:18px; width:86px; padding: 3px; }
#user_login{ height:18px; width:86px; padding: 3px; }
#loginform label{ display:inline-block; width:2.75em; }
#rememberme{ border:0; padding:0; margin: 0 2px; background:none; }
#forgotText{ display:inline-block; margin-left:9px; height:26px; font-size:80%;}
.fbLoginButton{ display:block; height:18px; margin-top:7px; text-align:center; }
.wpfb-widget-avatar {float: left;}
.wpfb-widget-avatar img.avatar {float:none; margin:0; }
8. What if my theme doesn't support Widgets?The right answer: update your theme. It's *very* easy to support them, and they've been around for ages.
The wrong answer: <?php the_widget("Widget_LoginLogout", array('title' => 'Login')); ?>
9. I'm getting a 404 server error while trying to execute _process_login.php.
Your FTP client is probably set to upload files with the wrong permissions - try changing _process_login.php and the parent directory to 755. You should be able to access _process_login.php directly and have it say "Please do not access this script directly." If not, that means your server isn't executing the php at all (and it's a problem with your server configuration rather than the plugin).
10. I'm getting a 500 internal server error while trying to execute _process_login.php
In order to find the cause of this issue, you'll need to view your raw server error logs (contact your webhost if you don't know how). 9 out of 10 times it's because some necessary module (like cURL) is missing or disabled.
11. I can't login - the popup always says "Invalid Argument," and something about a cross-domain receiver.
The Site URL you enter must match the base URL of your site. A common mistake is to have a website like http://example.com, but enter http://www.example.com. Also make sure you've entered it correctly in Wordpress under Settings -> General.
14. When I click the "Login with Facebook" button, nothing happens - no popup dialog.
Most likely your page has other javascript errors that are causing it to stop executing before it reaches the login button. Load it up with Firebug and see. For information on how to use Firebug, please visit Firebug.com.
17. Whenever I try to login, I get stuck with "You must be logged in to Facebook to use this feature."
You've probably disabled third-party cookies in your browser. Facebook Connect requires cookies.
19. I'm getting the error "Could not access the Facebook API client (failed on users_getInfo())"
This script requires that your server either have cURL installed or FOPEN enabled. If neither are available, it won't be able to contact Facebook. If you do have cURL but are getting "CurlException: 6: name lookup timed out", you can workaround it by modifying the Facebook library as documented here. If you're getting "CurlException: 60: SSL certificate problem," you can workaround it as documented here.
20. Whenever I try to connect, I get the error "Failed nonce check. Login aborted."
The "nonce" is a security feature builtin to Wordpress (see here), and not something I personally implemented. It's possible that something funky is going on with your cookies, or that a caching plugin is breaking this functionality. However, as I've never experienced the problem myself, and as nonces aren't specific to this plugin, I'm afraid I really can't tell you what your problem might be. If you simply can't figure it out and are desperate to get the plugin running, I've added a debug option to "DISABLE the nonce security check" - but note that I don't recommend using this as it will result in weakened security by skipping the nonce check entirely.
22. Can users who connected with this plugin also login manually (not via Facebook)?
Yes, an autoregistered user is the same as any other WP user. However, they'll need to login with Facebook once so they can edit their profile and set their own password. Alternatively, you can purchase the premium addon which can send a custom welcome message (along with login credentials) to autoregistered users.
23. I don't like the username/role/something about the autoregistered user accounts. Can you change it?
You're free to modify the userdata to whatever you'd like via the filters documented above.
24. "Login with Facebook" only appears as text, not a clickable button.
Either your theme isn't calling wp_footer or you've got other Javascript errors on your page (See FAQ14). Also, if you're using a Facebook Social Plugin, try the iFrame version (rather than HTML5 or XFBML).
27. Why can't users who've connected with Facebook change their avatars anymore?
The option to use Facebook avatars cannot be overridden on a per-user basis. In other words, if enabled, all users who've connected with Facebook will see their profile picture rather than their Wordpress avatar.
28. How can I request another feature for this plugin?
If you have an idea for a general feature you'd like to see added, you may leave a comment below. Please note however that new features are only being implemented in the Premium add-on at this time. They will be approached in order of popularity, urgency, and ease.
30. Can I receive update notifications for the Premium addon? How do I perform the updates?
Whenever a new version is available, I'll announce it in the comment thread below and on the Facebook fanpage (admin panel notifications are in the works). Users will then have their remaining download counts refilled, and may grab the latest version from store.justin-klein.com (just like after the original purchase).
31. I've downloaded and installed the Premium addon, but I still can't access its features.
WP-FB-AutoConnect-Premium.php goes in your plugins directory (i.e. wp-content/plugins/WP-FB-AutoConnect-Premium.php), not the WP-FB-AutoConnect directory (i.e. wp-content/plugins/wp-fb-autoconnect/WP-FB-AutoConnect-Premium.php). This is to prevent it from getting overwritten when you auto-update the core plugin.
32. I've paid for the Premium addon, but the download link isn't available.
For the store to instantly confirm your purchase, you must use an instant payment method on Paypal. eChecks take 3-5 days to clear, so until that time the store will not auto-enable the download. If you did use an instant payment, it's possible that some "special characters" in your name or address have tripped up its notification system - if this is the case (extremely rare), I'll manually approve the order the next time I check my email.
35. It doesn't seem to work in so-and-so browser.
Please reconfirm any browser-specific issues on another computer before reporting them below; 99% of the time they're caused by something on your local system. Make sure you tell me you've done this before reporting a browser bug, or I'll just redirect you to this FAQ. Note that the plugin has been tested and confirmed working on all major browsers (including iOS and Android).
36. How can I modify the plugin to work a bit differently / How can I implement some not-included feature?
As this plugin is open-source, you're welcome to tinker and modify it as you like. However, I do not provide free support on customizations beyond what's included with the plugin. If you need customizations that you can't implement on your own, I suggest hiring myself or another experienced Wordpress developer to do so for you (or, see FAQ28). Note: asking me to tell you exactly what to add/modify is the same as asking me to do it myself.
37. Whenever someone tries to login, it says "Error: Failed to get the Facebook user session..."
Thus far, every report of this bug has been due to conflicting plugins or themes (see FAQ100, 1st subitem). Some particularly common conflicts:
- Facebook plugins. Make sure any other Facebook plugins have been updated to OAuth2, and that they're configured to use the same AppID as this one. You cannot load more than one AppID on a given page.
- CDN plugins. Make sure to add an exception so this plugin's directory does not get copied to a CDN.
- Caching plugins. Some include CDN functionality (see above), or cause issues with cookies.
- Themes that have one or more of these features built-in.
The option to show an avatar is available via the Premium widget only. If you're already a Premium customer but aren't seeing an avatar, head over to Appearance->Widgets in your admin panel and make sure you're using "WP-FB-AutoConnect Premium" (not "WP-FB-AutoConnect Basic"), and that the "Show Avatar" option is enabled.
39. Logins seem to be incredibly slow, or I'm getting an error about the server's memory being exhausted.
This has been fixed as of v2.3.0. Please update your plugin.
40. Imported Facebook avatars are too big / too small / too unpredictably-sized / not showing at all.
Facebook thumbnails are always 50x50, so if you're seeing something different (or nothing), your theme is probably calling the avatar function wrong. Try it out on the default theme. If you're intentionally showing the fullsize profile image but want to enforce consistent dimensions, you can do that with CSS.
100. Something else isn't working. What should I do?
- Try disabling *ALL* your other plugins and using the default theme; conflicting plugins and broken themes are by far the most common cause of problems. If that works, you should be able to pinpoint the source of the issue by reactivating them one at a time.
- Try deleting your Facebook application, recreating it from scratch, and re-configuring the plugin. The few problems not solved by #1 are nearly always solved by this.
If you've done your best with everything above are still having a problem, you may post a question below - but make sure to include all of the information requested in the bold red note just above the comment form. If I've redirected you to this FAQ, it probably means that you ignored the note and omitted some or all of the info.
Feedback/Support
If you have any support requests, please use the comment form below and I'll do my best to get back to you.
Important: Make sure to include a clear and detailed explanation of the problem; "It's not working" isn't enough for me to help. Also, please include *ALL* of the following information. If you choose to ignore this when reporting a bug, you may not get a reply:
- Have you tried disabling all your other plugins and using the default theme (FAQ100)?
- Have you tried recreating your Facebook app and reconnecting it to the plugin (FAQ100)?
- Have you tried it in another browser (FAQ35)?
- Provide a link to the site that isn't working.
- Provide the information from the "Support Info" tab of the plugin's admin panel.



I just upgraded to the premium feature, looks great, but I found 1 bug and have an another question:
Bug: When use create an account via FB AutoConect, the user have no user level, so he can access only the “public pages”. This problem didn’t occurred in Free Version. Know this issue?
Question: In your download panel, but it’s says “2 remaining” and 1 now, after download. If have updates, etc, I will have to download this last archive and pay again in next update? Isn’t one-time purchase?
The other things are working fine, great job.
Thanks
re: upgrading Premium.php
great.. thanks Justin. I am using the version i downloaded on the 8th.. seems to work
(BTW.. I looked at the code in Premium.php – I did not see a version number.. is there one in there that can be used to ensure the version of the plugin and version of Premium.php are in sync? I just found the line define(‘JFB_PREMIUM_REQUIREDVER’, ’1.6.5′);)
@Dennis:
Bug: Since I never explicitly set a userlevel *anywhere* (neither in the free nor premium version), the difference was almost certainly caused by something else. In any case, you’re free to use the hooks & filters I’ve documented above to set the userlevel to anything you like.
Question: See my comment reply posted 10 minutes before yours.
@Rob:
…Yeah, the line of code immediately above that one
define(‘JFB_PREMIUM_VER’, 11);
(And it’s shown in the admin panel, as well as in the login logs.)
Just bought and downloaded the premium version this morning, it’s ace. Thanks
@justin Ok, I will try make change here, if got anything I will update you if someone else ask too.
About the premmiun thing. I read and now understand it, Thanks and Good Work.
C ya.
Hello again!
Well, I was testing a lot of possibilities (including deactivating plugins) and I removed the premium feature too. Well, the problem is really in Premium feature, cause after remove the premium file it works normal, registering the user and giving him an level.
With premium it doesn’t work. I event tried to remove the S2 Member (the plugin that administer levels better then custom BP installation), and the problem still.
You say something about give an level to the user. You know if it’s possible and can you tell me where I have to use the code?
Well, thanks for plugin and the support, everything else was working very fine (even more then I really need, haha.)
@ewebber: Thanks!
@Dennis: I really don’t know what to tell you, other than to guarantee that nothing in the Premium addon does anything with user levels. Actually, I’m not even sure what you’re referring to when you say “user levels”. Do you mean to say Roles? “Levels” haven’t been used since before WP 2.0 (see here), which was released more than 5 years ago.
@Justin Yes, the Roles. I said “levels” because in s2 Member plugin add “levels” too. But in my project any new registration will be “Subscriber” (even the free version of the FB AutoConnect plugin). Well, and you know if is possible to select the role of the user when it register with your plugin? Maybe something like that can fix that problem.
Autoregistered users will have the default role as specified in your WordPress options. If you’re using some other plugin that adds something else, you’ll need to handle this yourself – I’m not sure how it deals with “levels” or even what they mean, but “actual” WordPress levels have been in disuse since 2005 and depreciated since 3.0. So again, you can modify new users however you like via the filters documented above.
@Justin So, if the WordPress default is “Subscriber”, is possible to FB AutoConnect register as “Editor, Autor, etc” with those filters?
Almost certainly.
@Justin Ok, Thanks. I’am will try some differtent ways. Looking for some WordPress topics I found that:
$user = new WP_User($userid);
$user->set_role(“subscriber”);
Maybe I can use that in the register filter in some way.
pp until 10 or more people are using the app. Would that have something to do with it? Do I have to have the FB app users and submission before the login starts to work?
@Dennis: Good luck
@Daris: I have no idea what you’re saying.
Sorry have of the message posted. I was saying that I deactivated the other plugins that I have and tried reactivating FB connect. When I check Facebook to make sure my ID and Key or correct I tried to submit it and I get this message ” Your application must have at least 5 total users or 10 monthly active users before you can submit it to the App Directory. We cannot showcase any applications that are under construction or do not utilize the Facebook Platform.” So I’m wondering if this had any implication to why the FB-connect isn’t working for me.
Hello again.
I removed all plugins again, working only with BuddyPress and WP-FB-AutoConnect and the problem persist. And now I discovered that the problem is even worst, if you use to login it change your role (doesn’t mater if is subscriber, administrator or “super administrator”).
The problem is really in this “premium update”. Don’t have another way to use the change from free to premium?
@Daris: …No, Facebook’s app directory has nothing to do with the plugin’s functionality. You still haven’t mentioned one of the two critical tests I suggested though (theme), nor have you described anything about your problem whatsoever.
@Dennis: What problem? I thought we learned that you’re using another plugin which uses something other than “standard roles” (i.e. levels), and you were trying to figure out how to make them behave how you wanted together.
Regarding roles in general, I’m using the Premium version here, just changed the “Default Role” to all available options, and in every case, the plugin created new users of the correct role. I just asked another friend to confirm that his users are coming in with the correct role, and he said they are (with the Premium version). You’ve definitely got something else going on; this plugin works fine with “normal” WordPress roles.
@Justin The other plugin add more options, but the default roles still there. I think can’t be any kind of conflict because all other plugin were disabled. If it’s didn’t work in any case, could be an installation or db problem, but the problem appear only with this premium features. Could be an conflict there with the installation? It’s weird, but I really don’t know what to do.
The problem is i’am not an php expert, but I can 2 ideias in mind:
First: If user use the plugin to create and account, force it to be “subscriber”, don’t let “WordPress Default”.
Second: Make something to check if user have an role, if don’t, make it “subscriber” automatic.
The problem is that I’am not WordPress or Php expet, I thougth you could have an ideia, since you developed the plugin and the problem appears only with premium. Isn’t an way to I disable manually each premium feature to check if the conflict is with one o those? Because if it’s appear only with the upgrade, the upgrade is causing some kind of conflict, the question is discover where.
Isn’t an way to check the complete log of the connection with Facebook? Maybe that way I can check some differences between the free and premium version.
It has nothing to do with Facebook/logs.
But again, I ask: what problem (specifically)? Are you saying it’s not respecting the default role setting? Because before you were saying something about levels, then you said “if you use to login it change your role” (which I didn’t really understand). Please be very concise about the exact problem. For instance:
“When users first login and the premium addon is active, it doesn’t give them the default role specified by the WordPress option. When they login but the premium addon is not active, it does give them the correct default role.”
I really need to know the exact problem, or it’d be impossible to debug.
Also, (once you’ve told me the problem), does it happen with Buddypress disabled?
Are you using a MultiSite install (you didn’t say)?
Hi Justin, I bought the premium plugin and everything looks fine except one thing.
After the login prompt, instead of appearing the second popup asking to allow the application, a white window comes up where a “Go to Facebook.com” text-link blink twice before redirecting the logged in user.
Basically the login works, but it arbitrary bypass the Request permission prompt.
All configuration settings looks correct…
Could you please have a look? http://buxula.it
Thanks,
Paolo
@Justin Ok, sorry. I think I talk much about possibilities and problems in same time, let’s start again.
I’m using WordPress (3.0.5) + BuddyPress (1.2.7), is a multisite network. I was using your plugin in free version and was working fine, nothing different. When I’m using the premium version it got an problem, when user register or login with the Facebook button his “Role” change from Subscriber (Administrator or anything else) to “no function on this site”. With this Role it can access any page that are for only members.
I tried to deactivate all plugin. Using only the FB-AutoConnect and BuddyPress (I will try without BuddyPress now, but doesn’t make sense because was working before) nothing change.
I discovered the problem is with BuddyPress.
But, why the free version works and the premium not? There is an question…
You know if anyone is using this plugin with BuddyPress? Because it was update not much time ago, maybe is some conflict appear now.
Yeah, I apologize that I did not mention that I also set the theme to the default buddy press theme.
I know you want us to disable all plugins and use likely use the default wordpress theme, but shrug, just an FYI for you
Thanks for the great plugin, I’ll likely be buying the premium one in the next few paycheck.
Problem solved…. sorry for bothering!
Paolo
Hello again,
If I make a new WP installation, start from 0, I will have to waste 1 of my premium downloads? I think if maybe is the only way, start again and only important DB content after everything is working fine.
Thanks
Is there a way to force the plugin to send the new user the emails that are normally send when a user registers through the standard WordPress/BuddyPress signup? I understand that the paid version of the plugin can send emails, but still I’d like to be able to configure the emails in one place instead of two.
Btw, thanks for your work, and I’m almost certainly gonna go for the paid version anyway as it really does have some must-haves and it’s inexpensive.
I logged into your site with my facebook id. Then I clicked on the logout link and it logged me out.
However, when I clicked on the ‘Login with facebook’ button again, it automatically logged me as the previously logged user. It didn’t ask me for any credentials.
I went back and tried on my site where I have implemented this plugin and is giving me the same result.
Is this an issue with the plugin? I would expect that explicitly clicking on ‘logout’ button would log me out of the facebook platform.
What do you think?
Hi Justin,
I purchased the premium version strictly to get these features:
Add a Facebook Login button to the WordPress login form (wp-login.php)
Add a Facebook Login button to the WordPress registration form
I clicked both to enable them in the plugin settings, but I don’t see the facebook login in my “register” and “login” pages. I cleared the cache, restarted the browser, etc, but still nothing. The only thing that works is the FB connect widget that can be put in the sidebar. (the free version)
I don’t have any other plugins running that may be interfering … I am using the most recent version of the plugin.
Can you help me?
@Paolo: Coo, glad you got it
@Dennis: If you comment out the following line in Premium.php, does it work?
if( is_multisite() ) add_action('wpfb_login', 'jfb_multisite_add_to_blog');(…And no, you don’t need to download the file again just to upload it to your server again. Just use the copy you already have…)
@Bryan: That’s really strange. Can anyone else confirm this? If you’d like to try and debug it I can give you some test code to try out…let me know.
@Anton: Sure, but you’d have to code it on your own. You can just add a hook to run when a new user is registered and perform whatever actions you want there (as documented above).
@Mangachalil: No; logging out of a WP site logs you out of that WP site not of the WP site and Facebook (regardless of what route you took to login to it). If you want to logout of Facebook, you can go to Facebook and logout there. It’s standard Facebook Connect behavior
@Aleks: http://skilledcalgary.com/wp-login.php is not the default wp-login.php, so you must either have other plugins active that are altering it, or it’s been modified in some other way. It works on a default wp-login.php, but if yours has been changed such that it doesn’t call the standard hooks in the standard places, it won’t work. You can see that it will work properly on the default wp-login.php page here:
http://www.justin-klein.com/wordpress/wp-login.php
Hi Justin,
Thanks for your hard work on this plugin!
I’d like to report what I believe is a bug, along with a proposed fix. I’m using version 1.6.9 of your plugin with WP 3.0.5 and BuddyPress 1.2.7 in a multi-site subdomain setup. The login page renders fine (along with Facebook button) on Firefox and Google Chrome. The page does not render correctly on Internet Explorer 8 or Safari 5.0.3. I’m using Windows Vista.
On IE8 and Safari I have several missing elements on the login page including the BuddyPress admin toolbar, Facebook button and footer.
The proposed fix is to Main.php in your plugin. There are 4 occurences of the script tag
followed by a JS line comment followed by html comment. My Javascript reference book indicates that to hide script from older browsers, there should only be an opening html comment, not preceeded by a JS line comment. I am using current browsers, so this shouldn’t be a concern; however it is a problem for IE 8 and Safari !
The fix is to remove the JS line comment and only use an opening html comment after the script tag. I verified that this fixes the problem.
The affected lines in Main.php for this version of the plugin are:
L73, L94, L118, L151
Scott
Hi, sorry to be a bother. I downloaded and installed (using WordPress’s web interface) and I cannot access the settings page after activation. I get the “You do not have sufficient permissions to access this page.” error.
I am using WordPress 3.0.5, I’ve tried turning off all other plugins…
Any thoughts are appreciated, thanks.
I saw this on on the facebook developer site.
http://developers.facebook.com/docs/reference/javascript/fb.logout/
Was wondering if this is something that can be incorporated? I do a fair share of coding but not much on php, so not sure if I can incorporate this or not into your plugin. If it is possible, kindly provide some hints so that I can try to put this in. What do you think?
@Justin
Just fixed it! Really thanks for the help, support and congrats for excellent plugin. I commented the line that you mention and it’s working just fine as the free version. How did you discovered that? And can this cause any other kind of problem or will I lose something with that?
Thanks by now.
It’s working fine by now, any news I will tell you.
@Scott Carter: Thanks for the note, and for taking the time to figure out a solution
However, I must say that I find it kinda hard to believe that those comments alone would be causing the problem you mention – first, because I do 50% of my testing in IE8 and have yet to see a problem in the (nearly a hundred) sites I’ve debugged, and second, because none of the 50k+ downloads have reported this (it’s been there since the first version of the plugin). My guess is that there might be some obscure conflict with something else on your site. In any case, glad you got it working
@Dougal Graham: Sorry, never heard of this. I have confirmed it’s working on 3.0.5 (on 3 or 4 other sites, not my own) so I can only guess that something funky is going on with your useraccount or elsewhere in your WP installation. If you try it on a default install of 3.0.5 with the default theme and no other plugins, it definitely works – so you could start debugging from there.
@Mangachalil: I added it to my list of feature requests and will look into next time I can (that’s JS btw, not PHP)
@Dennis: If you have a user autoregister with this plugin on one site in your multisite WP installation, then on another, the 2nd login will fail: it’s no longer multisite aware. Apparently the function add_existing_user_to_blog() is overriding the default roles for you. You can look at setting them back to whatever you want after that function is called if you like; otherwise I’ll add it to my list of things to look into when I get a chance.
Thanks Justin. I think it may be a change in user permissions in the DB cause by an outdated user capability manager that stay in effect regardless of whether it is active or not. Thanks!
hey justin,
i’ve integrated your (premium) plugin on my site and it really works great, thanks so far
is there a roadmap for premium-features?
one request: sending all my friends a message after the successful login
@Justin: Thank you,
btw, I found some more materials, in case it helps:
There is a working copy of the login / logout using JS API here:
http://thinkdiff.net/facebook/graph-api-javascript-base-facebook-connect-tutorial/
The complete example is here:
http://thinkdiff.net/facebook/graph-api-javascript-base-facebook-connect-tutorial/
I tried this by creating a new page on my test site to connect to my app and it appears to work good.
Really appreciate your efforts. This is an awesome plugin. I love the hook that you left to check if the connecting user is part of friend’s list.
Hi Justin,
When I choose the username to be registered which includes period, the user profile gets 404. It was working before the recent update though.
Profile example which gives 404 : http://www.technospot.org/profile/Khoerotun.Nisa/
Though this profile created before update works http://www.technospot.org/profile/arifparvez/
Any pointers.
Thanks.
This profile tu
@Dougal Graham: Sounds pretty likely…
@Alexander: FAQ28
@Mangachalil: Coo, thanks
@Ashish Mohta:
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/characters-in-usernames-cause-strange-issues/
Hi Justin,
“@Aleks: http://skilledcalgary.com/wp-login.php is not the default wp-login.php, so you must either have other plugins active that are altering it, or it’s been modified in some other way. It works on a default wp-login.php, but if yours has been changed such that it doesn’t call the standard hooks in the standard places, it won’t work.”
I’m afraid this really isn’t what I am looking for then. I was under the impression it would work on the wp-login.php page. I realize this may be a long shot, but if you would consider refunding the payment, it would be much appreciated. it was made under gwsulkowski@hotmail.com. I really have no use for the plugin as is.
Thank you.
>>I was under the impression it would work on the wp-login.php page
It *does* work on the wp-login.php page. In fact, that’s the most-quoted reason for which people buy the premium addon.
I would also mention that, in the same way that running a theme which doesn’t conform to WordPress’ standards isn’t recommended, it’s probably not the best idea to be doing so with your wp-login.php page either. If your page is neglecting to call the right hooks in the right places, there’s no way 3rd party plugins (mine or otherwise) could be expected to work properly, as they can only go based on where things are *supposed* to be called. An analog example: if a theme doesn’t call wp_head(), plugins won’t be able to output their CSS in the header.
I’m not sure if you want to try and fix your page or just give up, but for reference, the hooks I’m using are:
login_message (filter), login_head (action), login_form (action), login_redirect (filter).
And for the registration form:
login_message (filter), login_head (action), register_form (action), registration_redirect (filter).
Hey Justing. I forgot to Mention that I am running WordPress. Any ways to solve this for wordpress ?
@Ashish Mohta: You also forgot to mention 100% of the other information requested just above this form, i.e. if you tried it with all other plugins disabled, on the default theme, what version of WP you’re using, …
I am running into an issue using the this plugin (premium ver) and WP Super Cache. If I caching turned on and connected user logs out, it never does. Is there a way to have your plugin bypass Super Cache?
Thanks in advance.
@John: I’d suggest asking the author of Super Cache. I’m using w3-total-cache and it works fine with that, as well as (obviously) on a “default” install (aka without cacheing). So I dunno what his plugin is doing, but it isn’t really something I can control…
hey justin with your plugin active i cannot use the facebook cooments box on my page
when i deactivate the plugin this loads up fine
i get an invalid id for the provided XID error with your plugin active
FAQ26
Justin thank you for your response. You said: “@Jeannie: If you want to show avatars just call get_avatar() wherever you like…”
Please forgive my ignorance, but in which file should I add this? Thanks so much.