Facebook Sync (Facebook Connect) v1.0

Release Notes

*** Make sure you read the readme.txt in the zip to know where to get the Facebook API key. Also make sure to put the API key under the settings in the tool administrator***

 

About the Plugin

The Elgg Facebook plugin allows your existing users to login to their account on your site using Facebook, and new users to create an account using Facebook. It also allows users to disconnect from Facebook which follows Facebook's TOS so your developer account won't get banned.

Your existing users will be given the option to sync their current account with their Facebook account, or the option to not sync and create a new account using their Facebook login. 

The plugin pulls the following from Facebook:

  • Name
  • Profile Picture
  • Hometown
  • Interests
  • About Me
  • Latest Status

Once a user is registered with Facebook they can login to your site any time by clicking on the connect with Facebook button(s).

The plugin asks users for an email address to cross reference exisiting users as well as being able to store their email address since Facebook doesn't give that information out. 

Then if you want to sync accounts it asks for your existing password so no one can hijack your account.

 

What's New

Admin settings give you the options to change the login landing page, change text in each dialog box for new user registration and the ability to set the width and height of the downloaded Facebook dashboard image and the topbar image (this doesn't mean you can change the default Elgg avatars, but images from Facebook will have your size settings).

 

New Installation

  • Copy fbconnect folder to the mods folder
  • Enable plugin
  • Input API and Secret keys
  • Modify any settings you wish

Upgrading

  • Disable the fbconnect plugin
  • Delete the plugin folder
  • Copy over the new fbconnect plugin to the mods folder
  • Activate the fbconnect plugin
  • Input API and Secret keys
  • Modify any settings you wish

 


Support & Issues

If you have and issues with the plugin please comment, we do not officially support this plugin but we will try to help anyone who has an issue.

If you find any bugs please also report them here as well as any fixes and we will incorporate them into the next release.

Feature requests will be considered as well.

 

Screen Shots

Settings Page

image


Verify Email

image


Sync Accounts

image


Verify Password

image


Confirmation Notice

image


Email Received

image

  • Form is missing __token or __ts fields

  • Ok, it does work if you change mod/fbconnect/views/defoult/fbconnect/loging.php  to this.

    <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 elgg_add_action_tokens_to_url($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>

  • still having some problems in IE8. After u eneter the FB info it will just not redirect to the site...work perfect on Firefox/Flock

  • ok...the first time user login it doesnt ask em to sync their acc or anything...The second time in the last step it will ask for the new site password, but no matter if u create a new one or type your facebook pass, it wont accpt it and it will stay in a eternal loop asking for it.

    Can anyone make this work...this is one if the best plugins ever :(

  • elgg says "__token or __ts fields" ... how can i fix this in elgg 1.7 ?

  • I have Elgg 1.6.1 installation. How do you remove the "Connect with Facebook icon on the home page when a user is not logged in?

    I don't want the facbook option to be availible unless a user is logged in.

     

    Thanks,

  • use the isloggedin function

  • what about this awful token stuff ?

     

  • Hello, 

    I've just upload this plugin and install it on my 1.6.1 version. Everything's good until I try to sync my account facebook. I try to connect to my site with facebook plugin, but after i gave my adress & password, i had not a blank page but a page with only this message :

    /Volumes/DATA/SiteWeb/elgg_1.6.1_test//_graphics/temp.jpg

    I tried to find from where come this message but I didn't find.                                                              Do you an idea ?

    Thanks,

    Benoit 

  • can anyone help me with this "__token or __ts fields" issue in elgg 1.7 ?!?

     

  • Isn't this plugin in development ?

  • idiotter, you can try to refactor fbconnect plugin using the "ajaxactiontokens" plugin

  • ok is this working perfect for anyone?

    Can i install it on 1.7?  I know zilch on any sort of programming so really need a plugin that is hassle free.

  • "__token or __ts fields" issue in elgg 1.7 Solution

    All you need is to modify views/default/fbconnect/login.php :

    1. On the top of the file add

    <?php  $url = elgg_add_action_tokens_to_url($vars['url']."action/fbconnect/login"); ?>

    2. Replace

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

    with

    document.location.href = "<?php echo $url ?>";

    3. Clear browser's cache.

    Good luck!

  • Has anybody tried this with the 1.7.2 beta i've tried all the fixes here but none of them seem to work.

    I still get the __token or __ts fields issue after entering my facebook credentials.

  •  

    I'm having a weird bug where the plugin pulls out a photo of another user for anyone connecting with facebook connect and sets that as his profile picture (while it belongs to someone else)....

    Any ideas?

  • Ok Facebook Connect does not work with the Brand New 1.7.2 I tried with different accounts and not working says:

    Sorry, you cannot perform this action while logged out.

    Can anyone HELP ME on this thanks : )

  • I'm usgin elgg 1.7.3 and  I already did change code to (login.php file):

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

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

  • the same

     

    this doesnt work with elgg 1.7.3

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

     

  • Hi

    i am trying to set up my facebook app, but do not get the "connect" settings. The only ones I get are:

    About, Website, Facebook Integration, Mobile and devices, Advanced

    all the tutorials i look at show more options, anyone got any ideas why i dont get all the options?

    thanks

  • same issue..

    this doesnt work with elgg 1.7.3

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

  • please help i get this error

     

    <!-- /#wrapper_header --> <!-- /#layout_header --> <!-- main contents --> <!-- display any system messages --> <!-- used to fade out the system messages after 3 seconds -->

    $(document).ready(function () { $('.messages_error').animate({opacity: 1.0}, 1000); $('.messages_error').animate({opacity: 1.0}, 5000); $('.messages_error').fadeOut('slow'); $('span.closeMessages a').click(function () { $(".messages_error").stop(); $('.messages_error').fadeOut('slow'); return false; }); $('div.messages_error').click(function () { $(".messages_error").stop(); $('.messages_error').fadeOut('slow'); return false; }); });

    click to dismiss

     

    Form is missing __token or __ts fields

    <!-- /#wrapper_header --> <!-- /#layout_header --> <!-- main contents --> <!-- display any system messages --> <!-- used to fade out the system messages after 3 seconds -->

    $(document).ready(function () { $('.messages_error').animate({opacity: 1.0}, 1000); $('.messages_error').animate({opacity: 1.0}, 5000); $('.messages_error').fadeOut('slow'); $('span.closeMessages a').click(function () { $(".messages_error").stop(); $('.messages_error').fadeOut('slow'); return false; }); $('div.messages_error').click(function () { $(".messages_error").stop(); $('.messages_error').fadeOut('slow'); return false; }); });

    click to dismiss

     

    Form is missing __token or __ts fields

  • 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"); 

  • Sorry but by above changes i mean this:

    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.

     

Stats

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

Other Projects

View Springs Hosting's plugins