Simple Facebook Connect

( Hey, if you like SFC, why not check out Simple Twitter Connect too? )

Plugin: Simple Facebook Connect
Version: 1.1
Last updated: 12 days ago.
Downloaded: 344,636 times.

Overview

Facebook Connect is somewhat difficult to integrate with WordPress sites. Many plugins exist to do this, but they are overly complicated, or have security problems, or just plain don’t do the things you want them to do.

It doesn’t have to be this way.

Download Now

Requirements

WordPress 2.9 or higher. Yes, this plugin is for WordPress 2.9, which has not been released as of this writing. Some pieces might work on 2.8, but some won’t.

Features

  • Easy to install and use.
  • Modular. Only use the pieces you want to use.
  • Integrates easily into any theme.
  • Simple control panel, only has the options you need for the pieces you activate.
  • Secure. Uses the latest WordPress coding techniques to eliminate tricky security problems.

Current sub-modules

  • Comment using Facebook Identity (with FB avatar support)
  • Automatically Publish new posts to Facebook Profile
  • Manually Publish posts to FB Profile or Applicaton/Fan Page
  • Login with your Facebook credentials
  • New user registration with Facebook credentials
  • Share button and Shortcode
  • Connect Button Widget and Shortcode
  • User Status Widget and Shortcode
  • Live Stream Widget and Shortcode
  • Bookmark Widget and Shortcode
  • Find us on Facebook button Widget and Shortcode
  • Fan Box Widget
  • Fan Count Chicklet and Widget

Future sub-modules

  • Pull comments back from Facebook published posts into your site
  • (whatever you like, send me suggestions!)

Installation Instructions

  1. Upload the files to the `/wp-content/plugins/simple-facebook-connect/` directory.
  2. Activate the “Simple Facebook Connect” plugin through the ‘Plugins’ menu in WordPress.
  3. Configure Facebook Connect for your site by following the instructions on the Settings screen.
  4. Activate the sub plugins you want to use through the ‘Plugins’ menu in WordPress and configure them appropriately. Some require no configuration at all, some require minor theme changes.

Licensing

This plugin is licensed under the GPL Version 2 only.

Method to get support

You can email me directly, however I am also a moderator at the WordPress.org support forums, so you’ll find me there as well.

Special note about the comments plugin

So many people ask me this question that I’m now sick of answering it. I’m going to put the answer here, and it’s also in the readme.txt file that comes with the plugin. In the future, if you ask me this question, you will not get a response.

To make the SFC-Comments plugin work (on older themes), you need to edit your comments form. This is probably in your theme’s comments.php file.

Instructions:

  1. Find the three inputs for the author, email, and url information. They need to have those ID’s on the inputs (author, email, url). This is what the default theme and all standardized themes use, but some may be slightly different. You’ll have to alter them to have these ID’s in that case.
  2. Just before the first input, add this code:
    <div id="comment-user-details">
    <?php do_action('alt_comment_login'); ?>
    
  3. Just below the last input (not the comment text area, just the name/email/url inputs), add this:
    </div>

That will add the necessary pieces to allow the script to work.

Note: Newer themes that use the comments_form() function don’t have to add any code added to them at all. The plugin automatically handles that case.

Download Now

Support

After 3500 comments on this page, I’ve figured out that supporting the plugin here isn’t working well. So I’m moving support to the WordPress.org support forums. I monitor these regularly anyway, and it’s a better way to do this sort of thing.

If you need help, write a new post there. You can use this link to leave a comment specific to the plugin, and I’ll get notified when you do so.

http://wordpress.org/tags/simple-facebook-connect?forum_id=10#postform

3,502 Comments

  1. George says:

    Hi,

    I am using both Simple Facebook Connect AND Simple Twitter Connect and i have some problems:

    1.) When using the Like Button with Counter AND the Tweet Button they dont align on one line and looks very ugly. Is there a way to have the buttons aligned next to each other on ONE line?

    2.) By trying to enter the Like Button with counter manually into the post with the shortcode [fb-like] i always get the standard button. Is there a different shortcode for the Button with the counter?

    3.) Also by entering manually [fb-like] AND [tweetbutton] into the post doesnt align the buttons on ONE line. I tried this also with the standard theme that comes with WordPress.

    Any solutions?

    Thanks in advance

    George

  2. I reinstalled SFC and now when try to log in with my FB-account, it opens my site in the modal window (and not closing it). Why?
    (if I’m already signed in to FB, it works fine)

  3. Kevin says:

    I’ve installed your Plugin on a local Test-Server and everything did work fine. When I uploaded everything to the final webserver and started configurating the plugin a bug occurs: As soon as all three required IDs/Keys are being saved the options page doesn’t load properly anymore an some javascript funktions of the backend stop working. When i delete the options via phpmyadmin everything works fine again.

  4. Hi Otto

    Thanks for SFC. It’s brilliant. Just one thing though I’ve installed facebook connect comments and all works good. Apart from one thing:

    Once you have made a comment – the ‘share on facebook’ window opens – however the page information and the page to be shared in the pop-up box is for the wrong page. Also – if you log-out without leaving a comment – instead of redirecting to the page the user was currently on – they redirect to the same different page.

    For example – if you log in on this page: http://holeytonal.com/2010/08/give-me-your-love-florrie/

    you can comment and everything fine – but when you want to share the page or if you log out you will be redirected to this page (which is also my top viewed page if that is of any help): http://holeytonal.com/2009/02/the-best-music-game-ever/

    Thanks again for the plugin Otto and hope you’re able to help.

    Rylan.

  5. says:

    I want to know when the next version of this plugin will come?
    this version doesn’t support the Javascript SDK (XFBML) … iFrame Load Very Slowly.. :(

  6. It works very well!!
    Good Job. Otto. Thanks.

  7. Dan says:

    Two questions.

    1) I’m using the SFC connect plugin without the SFC login activated to allow users to connect with Facebook. Is this ok, I want users to be in session with FB but not wordpress.

    2) I put the status widget on my site, and used my user id and nothing is happening. I see the title on the site, but no status?

  8. I am using SFC with all plugins activated… I edited the comment.php, but i still don’t get the facebook avatars on my comments..

    the site is http://thegodfact.com

    is there any suggestion why? or are you using another plugin to push the avatars over?

  9. says:

    I’m having a hard time making the “share on facebook”button work, I cannot understand why only the title and the url are shared, there is no excerpt or image. I’m trying with A teme I’m devloping, but it desn’t work on twentyTen either.. if you want to check to try help me, or even point me in the right direction the site is: http://lukart.net/category/illustrazioni/

  10. Hey,
    my like button just died, overnight. It has forgotten previous “likes” and nothing happens when I press it. The other sfc components I am using seem to be working fine.
    I have changed the url of my wp installation – had to rename the root folder yesterday – but i updated the fb app, made symlinks and everything else seems to be working fine. Any idea?

    • forgot to say, I am using v0.21 of the plugin with wp 3.0.1. I did update from 3.0 yesterday, not 100% sure if the problem occurred in connection with that or later in the day.
      My site is tekstopia.uio.no/flanor

      • weird. it started working again, all by itself. though the old likes are still gone. guess something must have been happening on the facebook side.

        • …hm, facebook keeps forgetting that i (and others) have liked stuff on the blog. the like button works, it just gets zeroed out after a day or two, so it says “be the first of your friends to like this” even though I have used the button with that post before. Any idea why?

  11. says:

    Hi Otto,

    just want to ask, I think i have set up all the plugin successfully,

    but when I’m trying to log in using connect with facebook at wp-login.php, after allow the application, it just redirect to wp-login.php again, nothing change and none error shown.

    Please help me. Thanks Otto

  12. says:

    Hey Otto, quick question. Will there need to be an update on your end or will your like buttons automatically update to the new ones that Facebook released? They have a new style. Checkout the buttons on http://techcrunch.com

  13. I have a closed site which doesnt allow new registrations as the site I run is for a Supporters Group and we want to restrict who has access to the site.

    I was wondering if it is possible with this plug-in that only registered members of the site are able to use the FBC, whilst those that are not registered could be re-directed to our online membership form, to join the Group and allowing us to create an account for them?

    Regards

  14. Alexis says:

    Hi Otto,

    Is it possible for auto-publish to embed the youtube video in Facebook?
    At the moment it appears to just sent a link over of the WP Article, and no thumbnail or ability to play the video.

    Thanks

  15. says:

    I need to know if there is a tweak available for buddypress to include this on registration page.

  16. Hello,

    We’re testing your plugin on our beta site, and so far there’s no appearance by any of the activated options.

    See: http://www.eriewire.org.php5-14.dfw1-1.websitetestlink.com/

    At this time, we are trying to allow people to comment using facebook, but there’s no option in the comment area for them to do so?????

    • says:

      Look up at the top of this page, where there’s a post, with words. One of those sets of words is “special note about the comments plugin”. Read that set of words.

  17. [...] Twitter connect access to my WordPress blog in under 10 minutes. All I did was download and install Simple Facebook Connect and Simple Twitter Connect then follow [...]

  18. says:

    Otto,

    Love your plug in it is just what I was looking for. One feature request, can you make it so that Facebook Users must be approved before they can login, or give the admin ability to block facebook users. I am running a family website and we don’t want everyone to be able access the website.

  19. says:

    I am confused becuase I thought I set this up right. I have an existing facebook profile page installed this plugin with about 3000 friends, and set up a facebook application per the instructions when I installed this…where I got the API id, privacy id, and app id. I set up the plugin using this info. It will auto post WP posts to my profile page ok, and the activity feed widget works fine, but the fan box, chicklet stats, and the status update are not working….. it seems as though they are trying to access the new facebook application page (where there are zero friends) instead of the existing profile page. what I am doing wrong?

    • says:

      This pre-existing page… is it a “profile” or a “page”?

      - A “profile” is like a normal user account.
      - A “page” is a page for a business or website or something, and it is owned by a normal user, but it is not a user in itself.

      Profiles have friends. Pages have people who “like” the page.

      You should never set up a user profile for a non-human-being, because a) it’s against Facebook’s terms of service and b) profiles are limited to 5000 friends, while Pages have no such restriction on who can like them.

      So if you already have a real Page and not a Profile, then you can put the Page’s ID number into the SFC Settings area, and then it will use that for the fan box and such, showing that Page’s fans instead of the Application’s.

      To find the Page’s ID number, the easiest way is click on the page’s logo image. For example on this Page:
      http://www.facebook.com/cybeerfest

      Clicking the logo image at the top takes you here:
      http://www.facebook.com/cybeerfest#!/album.php?profile=1&id=138202052878939

      Look at the URL. That page’s Facebook ID number is “138202052878939″. Putting that into the Fan Page space on the plugin settings will let all the plugins use the Page instead of the default Application.

  20. says:

    Hi Otto…thanks for the quick response!!! It is a regular profile normal account with friends. I am just confused as to creating an application for the plugin that basically starts a new page for the facebook account. What I want to do is auto post from the blog to facebook profile page (which is a success), use the like buttons at the end of post which likes to the profile page(success) but the fanbox and chicklet wants to use the stats from the new application page that was created when i set up the plugin

  21. says:

    Hi Otto,

    I never got a response to my other post so I just want to check something quick. I’m using this plugin on a test server right now that is setup as a multiple-site version (before going live with the theme) and I don’t see the buttons anywhere on the site (register, login, etc). Is that because of the MU version? Thanks.

  22. Hi Otto,

    I like your plugin, it does offer a better solution than most of the other “Facebook Plugins”. Well done, keep up the good work.

    I had a problem getting it to work at first. The secretID and appID would not save no-matter how many times I entered them. The strange thing is that the appKey saved fine. In the end I had to resort to looking for your settings info in MySQL and manually entering the data.

    I assume this is a new problem or just one that I’ve faced due to my setup (since, you have loads of positive comments about how well it is working for others). For anyone who does have the same problem, here is how to fix it:

    Open MySQL and go to the wp_options table, find the entry for sfc_options. The row should have some like the following stored in it:

    a:7:{s:7:”api_key”;s:32:”[YOUR API KEY GOES HERE]“;s:10:”app_secret”;s:32:”[YOUR APP SECRET GOES HERE]“;s:5:”appid”;s:15:”[YOUR APP ID GOES HERE]” …

    If your appID is not 15 characters long then change the ’15′ above as well.

  23. says:

    I am liking this plugin. Keen to try it on my side

  24. says:

    Hello Otto,

    Thanks again for creating such great plugins! I do, however, have one issue that I cannot figure out. I have followed the instructions on making a FB application and activated all the correct plugins and I have the FB Connect widget running. However, when I click on it I receive the following message:

    An error occurred with Sporting Fiend. Please try again later.

    API Error Code: 100
    API Error Description: Invalid parameter
    Error Message: next is not owned by the application.

    Any ideas as to what the problem might be?

    Thanks!!!

    Mark Paul

  25. says:

    I am using this great plugin to connect to Facebook. Nice and easy!

    But now I have a big problem. I use the Gravity Form for my contact forms, but with the “SFC-Like Button” turned on the user get 3 mails. I made post in the forum of Gravity Forms http://www.gravityforms.com/ and got this answer from the developer of Gravity Carl Hancock:
    “What you can do is try contacting the developer of that plugin and explain the issue. It’s most likely outputting Javascript when it should not be. It’s pretty common for developers to globally output code. This means that they output javascript to the page even when it is not necessary. When you do this, it can case conflicts with other plugins. This is how most conflicts with Gravity Forms occur. A javascript error happens because of this and then it causes javascript to quit executing, and the form builder won’t work at that point if javascript stops executing.”

    Any chance that you can take a look at this bug?
    I am sure you can just write Carl a e-mail if you need some more info. If you don´t have his e-mail just send me a short answer and I will send you his private e-mail.

  26. says:

    Question:
    So I’m using the the Simple Facebook Plugin, then I activated the SFC – Comments plugin. Added the code stated above in the comments.php. In which the facebook connect did appear but it appears twice. Once above the comments box and once below all the reply’s. Any idea whats going on? (Thanks in advance)

  27. Hey Otto,

    I’m trying to take the code you used for the comments:

    v–This code–v
    From: simple-facebook-connect/sfc-comments.php

    function sfc_update_user_details() {
    fb_connect_user = true;

    // Show their FB details TODO this should be configurable, or at least prettier...
    if (!jQuery('#fb-user').length) {
    jQuery('#comment-user-details').hide().after("" +
    "" +
    "Hi !You are connected with your Facebook account." +
    "<a href='#' onclick='FB.Connect.logoutAndRedirect(\"\"); return false;'>Logout" +
    "");

    What I want to do is to make it so that it shows the Facebook Avatar, and then says “Hi __Name_here___ you are connected with Faceook” shows up on in the sidebar widget.

    I know that I need to make the edit here:

    From: simple-facebook-connect/sfc-connect-widget.php

    $login ='Connect with Facebook';
    return $login;

    Any ideas on how this would be done?

  28. The last comment destroyed the code I posted… Hopefully this works:

    Hey Otto,

    I’m trying to take the code you used for the comments:

    v–This code–v
    From: simple-facebook-connect/sfc-comments.php

    function sfc_update_user_details() {
    fb_connect_user = true;

    // Show their FB details TODO this should be configurable, or at least prettier…
    if (!jQuery(‘#fb-user’).length) {
    jQuery(‘#comment-user-details’).hide().after(“” +
    “” +
    Hi !You are connected with your Facebook account.” +
    “<a href='#' onclick='FB.Connect.logoutAndRedirect(\"\”); return false;’>Logout” +
    “”);

    What I want to do is to make it so that it shows the Facebook Avatar, and then says “Hi __Name_here___ you are connected with Faceook” shows up on in the sidebar widget.

    I know that I need to make the edit here:

    From: simple-facebook-connect/sfc-connect-widget.php

    $login =’Connect with Facebook’;
    return $login;

    Any ideas on how this would be done?

  29. says:

    I have an issue with SFC’s like button. When someone likes something, they do not wind up liking the post, it says that they like the site. Is there a way to change that?

  30. sujoy says:

    I think its nice but not best.

  31. says:

    I’m wondering how I could find out who in particular liked the posts. Unlike in FB, “x others” is not a link I could click and see who those others are… any ideas?

  32. Jarod says:

    first, sorry my english-

    In the plugin share,

    how can i set the height of the popup? with .fb_dialog_content, .fb_shareIFrame{
    height: 300px !important;
    }
    works in chrome but dont works in firefox.

    and

    I can I change dynamically the description content in the popup ??

  33. Hey, just to say i’m having a very similar issue as Eric B.

    I’ve tried un-installing, creating a new app etc, but nada.

    Only the first post gets a unique ‘like count’ every other one seems to have got garbled up with the fan-page connected (i.e it just says XX are fans of this, when they’re just fans of the page.

    Michael.

    • I’ve disabled all other plugins, deactived SFC then deleted it. I created a new app on FB then reactivated a clean copy SFC (i had messed about with the last one just to have a poke around, i didn’t think i made any changes but i thought it was worth while just in case)

      I seen that all my settings from the previous install were saved, which leads me to wonder if i may have slipped up previously – when getting my fanpage ID i accidently copied the entire URL onto my clipboard (instead of just the ID) i then done a super fast ‘paste/enter’ – i have no idea how that input is sanitised, so i wasn’t sure if that could have messed something up.

      I’m also getting a new behaviour in that any time i echo in sfc_connect_shortcode it breaks the rest of the page (i.e if it’s called in just before my footer the footer will no longer display.

      The super annoying thing is that i didn’t have a single problem with my test server :(

      If you sort this for me there’s totally a beeroo heading your way.

      • Okay, so i dropped everything from my database, created a new app, fresh copy of wordpress using the default theme and installed SFC and only SFC and it’s still showing how many people like my page on facebook

        The thing that’s really flumixing me is that at no point have i made reference to that fan page.. anywhere on WP, the new app, or the url of the site on the page.

        So it’s either cached on facebook, or stored outwidth the wp_ tables.

        Argh.

        :(

    • says:

      Basically, you have something corrupting your loop variables. Could be something like a recent comments sidebar, or your theme could just use a crazy loop or something.

      Disable other plugins, switch to the default theme. See if it works properly with that. Once you know where the error is, then you can fix it.

      • Actually, i’m even more of a moron than that.

        403 redirect on everything but my ip to.. (you’ve guessed it) .. our fan page!

        I had tested it without the htaccess there(actually the first thing i done), but my cache but i must not have been cleared.

        But you’re still getting that beeroo for such an excellent plugin.

  34. Hi! wondering if anyone can help me, ive been having an error everytime i try to connect with facebook..it says in my wordpress login that:
    ERROR: Facebook user not recognized.

    • says:

      The error message seems clear enough to me. You’re trying to login, but it doesn’t have an account for your Facebook user.

      Log in normally instead, then go to Users->Your Profile and connect your WP account to your FB account.

  35. [...] Now all y’all can post comments and register at my site using your existing Facebook account! You’ve seen it on other sites, now it’s on my site. If you’re curious, I’m using Simple Facebook Connect. [...]

  36. says:

    i have installed the SFC .. but i am wondering what is the compatibility with wordpress Mu and buddy press?

  37. says:

    Hi!

    Is there a BBPress-version of this?

    Cheers

    Henrik

  38. says:

    Notice: Undefined index: HTTPS in /home/a8421853/public_html/wp-content/plugins/simple-facebook-connect/sfc-base.php on line 9

    Notice: Use of undefined constant SFC_IGNORE_ERRORS – assumed ‘SFC_IGNORE_ERRORS’ in /home/a8421853/public_html/wp-content/plugins/simple-facebook-connect/sfc-base.php on line 171

    ello,

    i use wordpress version 3.01.. when i use this plugin and activate and follow the instruction.. that error come out.. did u know how to solve it..

    Thanks i hope someone can help me..

  39. Thanks for a plug-in!
    But, after successfully logging in twitter and retuning in wordPress with GET parameter
    `oauth_token` I get a blamk page.
    Error_reporting does not help me to recognize a reason.
    `Plug ins Base` & `STC – Login` are used & active.

  40. Thanks for a plug-in!
    But, after successfully logging in Twitter and retuning in wordPress with GET parameter
    `oauth_token` I get a blank page.
    Setting the error_reporting does not help me to recognize a reason.
    Plug-ins `Base` & `STC – Login` are used & active.
    What a problem?

  41. says:

    Great Plugin!
    After getting this set up successfully, I edited a post and had buttons to publish to Facebook Wall and Publish to Fan Page.
    That worked, once.
    When I went into another post, to try it again, I got:
    “If you can see this, then there is some form of problem showing you the Facebook publishing buttons. This may be caused by a plugin conflict or some form of bad javascript on this page. Try reloading or disabling other plugins to find the source of the problem.”
    I disabled the base plugin and the publish plugin, then reactived both…same error. Not sure what I am doing differently. Any suggestions?
    Thanks!

  42. says:

    I edited my application, and corrected the url, and now it works again.
    How do I remove the Publish to my Wall button? I only want to use the Publish to my Page function.
    Thanks!

  43. says:

    Hello there.

    I know you have explained several times the comments plugin.

    Still i cant get it to work…

    here ir is my code as it is right now:

    <input type="text" name="author" id="author" value="” size=”22″ tabindex=”1″ />
    Nombre
    <input type="text" name="email" id="email" value="” size=”22″ tabindex=”2″ />
    Mail
    <input type="text" name="url" id="url" value="” size=”22″ tabindex=”3″ />
    Website

    I Placed the code ”
    ” right before the “author” input and “” below the “url” input

    I do get the message “Connect with Facebook” but its not a link or anything.

    Please help.

  44. says:

    Hello, my name is Zach!

    I have taken on the job as a company writer for LinenTablecloth, and am charged with overseeing our Blog and Facebook page. I recently downloaded your “Simple Facebook Connect (SFC)” plugin for WordPress, and I have encountered a problem.
    Basically, when I try and use the “Facebook Status” plugin in your arsenal of Facebook Connect plugins, it asks for a “Facebook Profile Number”. I assumed it was the profile ID for my company’s page, and used that. However, the space on the blog where it SHOULD be is still empty.

    Just to confirm, the profile ID is found when you go to your photos, and click on any photo NOT in an album… take the long strand of numbers at the very end, after “id=”, and that is the profile ID.

    Can anyone help me out here? I’m not sure what other “Facebook Profile Number” there should be. Am I doing something wrong?

  45. Miss P says:

    Hi Otto, very impressive work :)

    I’d like to know is it possible to use SFC with Facebook GROUPS? Because with group there is a problem that it doesn’t have “own” e-mail address & facebook status – and I can’t get the keys and secrets to install the script. A friend of mine founded that group, so should I just ask him to get the needed information? And does the fanbox work with “XXX members joined in the group”?