Facebook Connect V2 v2

Release Notes

Plugin re-created to work with Elgg 1.6, original work @Dave

Warning: this plugin is in the early stages of development. All feedback welcome to help us improve it. I do not recommend you use this on a production site just yet.


A new user who signs up via FBConnect will have their Elgg profile populated with their Facebook profile information and status, the avatar is also pulled across. The user's Elgg profile is sync'ed with their Facebook account, so each time they login in, it will update. Users can unsync their profile from Facebook and fill in the Elgg one, if they want.


  • If Facebook goes down or they disable FBConnect, any users who have logged in using FBConnect will not be able to access their account on your Elgg site.
  • It does not yet work with custom profiles, only the default Elgg one.

To use:

  • Upzip and add to your mod directory
  • Enable the plugin
  • You need to register your site as an app with Facebook - http://www.facebook.com/developers/createapp.php - to obtain a key and secret
  • Once you have created your app, under 'connect' you need to enter a Connect URL (route-to-your-elgg/mod/fconnect/) and Account preview UR
  • The code looks like the same fbconnect plugin from before? What did you change?
    looks like you just added this after someone else came out with a plugin that does a lot more.
    Are you on their development team? comin out with two plugins, pretty slick :D

  • is there any way to let current users connect their accounts together?

  • I just saw on the other facebook plugin that it follows Facebooks Terms of service, can I get in trouble if I use your plugin?

  • ok, i tested both plugin facebook connect 2 is much faster, it pulled profile info from facebook. It is great. The only complain is that it did not ask for user email as the facebook sync. Please add that feature. Also when the use logs out of the site, it should show a promt from facebook that the user has logd out 

  • @Robert Gregor how can i adjust the he image size from facebook. When the image is pulled from face book it is to big

  • Hello,

    I was wondering if you could help.  How could I go about putting this option in the top bar?



  • If you get a blank page at the first login you do not have installed the wire pplugin. So the function

    thewire_save_post($fbprofile['status']['message'], ACCESS_PUBLIC, 0, 'facebook');

    in /actions/login.php in line 89 is not available. So just make a // in front of the line, or install the wire :)

    @Robert Gregor: You schould ask, if the plugin is installed and enabled before calling this function.

  • I'll stick up for Gregor here... the original facebook connect by Dave doesn't seem to function correctly in the 1.6.1 elgg while this one does... the fbconnect by Springs Hosting seems okay but when you try to see where the connect to fb image comes from it lists unkown and seems questionable. I'll go with this version for now.

  • @All, I just made a quick fix, and as the top of my post states "Plugin re-created to work with Elgg 1.6, original work @Dave"

    @th3m4d0n3 I fixed it to work with elgg 1.6

    @australian coupons I tested in chrome & FF3.5 and was unable to reproduce the problem.

    @nadiab that is served from FB

    @Thomas - thx for the note, I'll take care of that in the next build

    @3Ncircle - thx for the support. I literally made this plugin in about 5 mins to help the community.


  • @Robert Gregor

    there are 2 locations (web pages) from where my user can login. how can i have them directed to different pages depending where they login in. Right now my facebook connect direct  the user to  the dashboard every time they login.  if for example i have a ecommerce plugin, and the user has to login at the checkout process they will be redirected to the dashboard. Where can i control this




  • @nadiab

    To edit the avatar thumb, add a width/height dimenion to the image in page_elements/elgg_topbar.php

    <img src="<?php echo $_SESSION['user']->getIcon('topbar'); ?>" width="20" height="20" border="0" class="user_mini_avatar">

    @Robert Gregor - thanks for the plugin, works perfectly with 1.6.1

  • Does this plugin have the option to show in the facebook wall what you write in the wire?

  • To make this plugin working in elgg 1.7 with action tokens, simply change the JS-Code mod/fbconnect/views/default/fbconnect/login.php tho

    function facebook_onlogin() {
    document.location.href = "<?php echo elgg_validate_action_url($vars['url'].'action/fbconnect/login') ?>";}

  • Hi there, LOVE the plugin - I'm using it to upgrade my fan site to make it link into Facebook.

    quick question - currently I'm seeing Location and Interests information imported onto my profile page, but I believe FBConnect is getting more than that from Facebook. How can I show the rest of the information? I think it might have somethign to do with the field names on the profile view - please advise.

    peace and love!

  • please is it possible to add a fonction  "invite friends"

    in this plugin ??

    that will be great :)

  • where do you enter the api key/secret. i'm not seeing any settings to do that.

    3) Enable the plugin, enter your api key and secret and you are ready to go


  • Hello @robert,

       Have you tested on Elgg 1.7?

       I have installed and it doesn't run. I have the error:


    Form is missing __token or __ts fields





  • See this and this for information about fixing token/ts issues.


  • @robert,

    I'm not a programmer, so I don't know how to implement the solution for the token/ts issues. Would you be so nice to update your wonderful plugin in order to work with version 1.7?

    Thanx. Patrice

  • where is the placement of the fbconnect button controlled?

    ie, can you point me towards the files i should edit to move the button's placement.


  • @Casey Yes I see the information but I don't know makin those changes.

    @Robert Gregor Have you got any plan to fix this great plugin for 1.7 version?



  • where do I enter my FaceBook hey and secrect apy question?


  • please could anyone help with this Form is missing __token or __ts fields issue ?

Robert Gregor

Web Designer: CSS extraordinaire, (X)HTML expert, Photoshop, Illustrator


  • Category: Authentication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 4000
  • Recommendations: 2