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.

About:

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.

Issues:

  • 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
  • For who encounter the missing __token or __ts fields issue. Here is the work around.

    1. Edit fbconnect/views/default/fbconnect/login.php

    2. add below php inside the <?php ...?> at top.

    $ts = time();

    $token = generate_action_token($ts);

    3. Change the code inside function facebook_onlogin() to below.

    document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login?__elgg_token=<?php echo $token ?>&__elgg_ts=<?php echo $ts ?>";

    Enjoy : )

     

     

  • Having issues synchronizing User Accounts.  When a user enters their UID and they use the FB Connect option it creates a new user instead of synchronizing their existing profile.  Anyone else experiencing this?  

  • When my users click the 'Connect With Facebook' button, it seems to work but they are taken to a page that just says "/applications/XAMPP/xamppfiles/htdocs//_graphics/temp.jpg". If they click the 'back' button, everything seems to have work. How can I fix this?

  • Hello,

    I tried to install the fbconnect on my website which is not in live. Till now what i did is

    I enabled the fbconnect which i downloaded.

    I entered the api key and the secret key in setting.

    I entered the connect url and connect preview url. 

    I modified the login.php with tokens.

    But i could not  see the fbconnect button on my website

    Can any one help me so that fb connect works

  • Hello,

    I just installed this plug ins, it worked great :) thanks for dave and robert...

    I need some help here...after i installed Facebook connect...every one can join to my website by clicked the button.
    I just founded the bug..When someone join using facebook connect button, automatically he/she has admin privilage...
    Is there any ideas, what should i do?

    Thanks

  • Anyone else having this problem? When a new user logs in using their facebook credentials, the Activity River on the dashboard shows ..  This message is shown 2 times as a Blank "Wire".

    Madiha Nahal: Reply (30 minutes ago)

    Madiha Nahal: Reply (30 minutes ago)

    Just shows doubles. This only happens with First Time logins using Facebook Connect. I'm using 1.7.1

    Hope you can help.

  • I got it working on 1.7. The only issue is logging out. If I log out from FB it doesn't log out from my web site. Or, if I log out from my web site it doesn't log out from FB.

    Can anyone help? Thanks.

  • Hey, this plugin works great! I was just curious as to if it was possible to make the fields such as 'About Me' and others of the like carry over from Facebook when registering. I'm using custom profile fields.

  • Hi, Thanks for the effort, is really good to have this plugin on my site. But I still can't make it works 100%. Previously i'm having the "Form is missing __token or __ts fields" issue. After following the instruction to edit the fbconnect/views/default/fbconnect/login.php the following error occurs: "Fatal error: Call to undefined function thewire_save_post() in /home/buddyjoy/public_html/frenchauto/mod/fbconnect/actions/login.php on line 90"

    BUT, pressing "Refresh" at the browser will still take the user to the Dashboard area. Then i tried logout and login again the error disappeared. Then I tried using another FB account to login the same error appear and I logout and login again there is no error anymore. So I guess the error come out when the Facebook user is 1st time login into my site. Any ideas?

     

    Thanks & Regards,

    Max.

     

  • At least my site can login using FB account so I guess that is my most important thing currently. 

  • Ok I deleted what I last said and the PlugIn is now working good no issues just that the User name says Facebook and a bunch of Numbers if someone signs up or signs in with the FB Login. But at this point I do not care anymore about that. I found something very interesting... I seen this a few times on other sites...

    The VERY First time you Login with Facebook and create that new ACCOUNT what happens is ONE Post will Auto Post to The Wire and Guess what?? It is coming from your Facebook Wall and I just seen this now! I been trying to figure out how to KEEP THAT GOING this would be a MAJOR Break Tru... What got me even more Excited is this Mystery Post on THE WIRE coming from my FACEBOOK Profile was also one that was Generated by Ping.FM from an RSS Feed from I think Cnn.com. So one thing is certain... Somehow Facebook LInked up with ELGG and Auto Posted ONE Update to THE WIRE the Second you Login in for the FIRST time with that Facebook Login. Now I tried to Logout and then send a Ping.FM test posts and see if it will do it again when I logged back in but NOTHING.

    I wanted to point this out and it is a MYSTERY of how Facebook Posted to THE WIRE and it even says THIS!!!

     

    Posted to the wire 17 minutes ago via facebook.

    This got me so Excited that I almost Fell out of my chair. I been Searching for a Way to AUTO POST to The WIRE from Facebook, Twitter, Ping.FM anything!

    This was the first time I ever been able to catch this on my own site. If anyone can Explain this unless it's and ACT of GOD or something Divine please let me know how to keep it going and Auto Posting from Facebook, Twitter and Ping.fm. Please LET ME KNOW!!! BTW someone is having FUN with the ELGG API and creating over 100+ Accounts Per day on my site with some auto BOT API Registration Exploit Hack. So BE ADVISED everyone is a TARGET in this Online Cyber Attack!

  • Hi Dennis... I can see you are excited!  You might have noticed when you used the FB connect on my site that it created a real name... this is because there have been changes to the Facebook API since Kevin wrote the plugin above and its previous incarnations. 

    Kevin is developing a new version with a few of us (we are paying him of course) and now the basic plugin is done, we are contemplating what other enhancement possibilities there are.  If you are interested in "chipping in" contact tcherokee on this site... the more the merrier (and the cheaper too!)

  • Im cannot uninstall your plugin!! HELP PLEASE!! When I disable your plugin I have blank page with text, what is going on??

  • I setup this patch for ELGG 1.7.1

    For who encounter the missing __token or __ts fields issue. Here is the work around.

    1. Edit fbconnect/views/default/fbconnect/login.php

    2. add below php inside the <?php ...?> at top.

    $ts = time();

    $token = generate_action_token($ts);

    3. Change the code inside function facebook_onlogin() to below.

    document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login?__elgg_token=<?php echo $token ?>&__elgg_ts=<?php echo $ts ?>";

    Enjoy : )

     

    It works, and I can connect my account. When I connect it sends me back to the home page, with the message You must be logged in to view this page. It appears to be signing me up and connecting to facebook but not logging me into elgg.

    Any ideas?

  • I got Facebook Connect to work!!! But what NEVER WORKS is Twitter Connect. I would like to see next a Myspace.com Connect / Digg.com Connect / FriendFeed.com Connect maybe even more! How can this be possible ... I also want to see a Ping.FM Integration with THE WIRE... An option that a person can Set Up Ping.FM with their API KEY and then can Turn ON or OFF all Wire Posts going to Their Set Up Ping.FM Account... Can ANYONE AT ALL make this?? SO far NO luck with anyone being able to do this will YOU BE THE ONE to Accept this challenge?? So many Social Networks have a GREAT DEAL of Integration with some of the Biggest Sites out there... Why can't ELGG compare to them??

  • Hi,

    I have enable this plugin on elgg 1.7.1 and working but I have find that it is problem  or no implement full sync from FB for exmaple I have see users who login via FBConnect import profile but in the Wire exist record post from FB user  but is empty

  • am I understanding the comments here correctly?
    that this free version of the plugin doesn't work and the developer is asking for cash for a working version?

  • @tunist - no you are not understanding correctly. Someone other than the original authors is working on a different more updated plugin and is being paid to do so.

  • This plugin is working pretty well on my site. I have elgg version 1.7.1.

    My only issue:

    When a user registers via facebook, they are unable to unlink the facebook account and edit a new profile. There is a toggle button to unlink facebook, but no options for making the account elgg only.

    basically, you can't unlink the facebook account, and would need to create a whole new account if you didn't want the facebook account linked.

    Any help/suggestions is much appreciated. Great work on editting the plugin and thanks for the community for helping me with all the other fixes!

     

  • @Wai Lam

    your solution doesn't work on elgg 1.7.3

    the plugin says: "Sorry, you cannot perform this action while logged out" when I try it.


    For who encounter the missing __token or __ts fields issue. Here is the work around.

    1. Edit fbconnect/views/default/fbconnect/login.php

    2. add below php inside the <?php ...?> at top.

    $ts = time();

    $token = generate_action_token($ts);

    3. Change the code inside function facebook_onlogin() to below.

    document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login?__elgg_token=<?php echo $token ?>&__elgg_ts=<?php echo $ts ?>";

    Enjoy : )

     

     


  • 1. Edit fbconnect/views/default/fbconnect/login.php

    2. add below php inside the <?php ...?> at top.

    $ts = time();

    $token = generate_action_token($ts);

    3. Change the code inside function facebook_onlogin() to below.

    document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login?__elgg_token=<?php echo $token ?>&__elgg_ts=<?php echo $ts ?>";

    4.Open up fbconnect/start.php, find the register_action call and change the second parameter from false to true.

    It worked for me.

  • same problem....

    your solution doesn't work on elgg 1.7.3

    the plugin says: "Sorry, you cannot perform this action while logged out" when I try it.

  • 1. Edit fbconnect/views/default/fbconnect/login.php

    2. add below php inside the <?php ...?> at top.

    $ts = time();

    $token = generate_action_token($ts);

    3. Change the code inside function facebook_onlogin() to below.

    document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login?__elgg_token=<?php echo $token ?>&__elgg_ts=<?php echo $ts ?>";

    4.Open up fbconnect/start.php, find the register_action call and change the second parameter from false to true.

    In face book connect then return to the elgg site this error throws,

    Fatal error: Call to undefined function thewire_save_post()...help me for the issue

  • please help i get the token error too..i see the sulotion here but i dony no how to add the code,,here is my .login.php

     

    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
    <div id="facebooklogin-box"><fb:login-button onlogin="facebook_onlogin();" v="2">Connect with Facebook</fb:login-button></div>
    <script type="text/javascript">
    function facebook_onlogin() {
        document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login";
    }
    FB.init("<?php echo get_plugin_setting('api_key', 'fbconnect'); ?>", "<?php echo $vars['url']; ?>mod/fbconnect/xd_receiver.html");
    </script>

  • I use Elgg 1.7.3 and after above changes have no problem to log into my elgg site by using fbconnect button.

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

    This is my last line in ../mod/fbconnect/start.php:

    register_action("fbconnect/login",true,$CONFIG->pluginspath . "fbconnect/actions/login.php");

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

    And this is my ../mod/fbconnect/views/default/fbconnect/login.php:

    <?php
    $ts = time();
     
    $token = generate_action_token($ts);
     
         /**
         * Elgg Facebook Connect login button
         * 
         * @package Elgg
         * @subpackage fbconnect
         * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
         * @author Kevin Jardine
         * @copyright Curverider Ltd 2009
         * @link http://elgg.org/
         */
     
    // creates a button that forwards to the login action
         
    ?>
    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
    <div id="facebooklogin-box"><fb:login-button onlogin="facebook_onlogin();"></fb:login-button></div>
    <script type="text/javascript">
    function facebook_onlogin() {
           document.location.href = "<?php echo $vars['url'] ?>action/fbconnect/login?__elgg_token=<?php echo $token ?>&__elgg_ts=<?php echo $ts ?>";
    }
    FB.init("<?php echo get_plugin_setting('api_key', 'fbconnect'); ?>", "<?php echo $vars['url']; ?>mod/fbconnect/xd_receiver.html"); 
    </script>

Robert Gregor

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

Stats

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