Facebook Connect Magento Extension

Facebook Connect Magento Extension

This is free Facebook Connect Magento extension which enables customers fast and easy registration and login with their Facebook identity.

This extension isn’t actively updated anymore. For newer Magento you can use separate Social Connect Magento extension from my coworker Marko Martinovic, Inchoo.

Important

Facebook updated it’s authentication mechanism but so did we, so please update your extension to the newest version since older versions won’t work anymore.
Also, if you’re getting “An error occurred. Please try again later.” message in connect popup, you need to get new “App ID/API Key” from Facebook and enter it into Magento. Check your Application Secret along the way.

Download

Download Inchoo_Facebook-0.9.9.zip, extract files to appropriate place following directory structure and reload cache.
Latest pre-relase versions can always be downloaded on my github project page.

About

Facebook Connect Magento extension enables customers one click registration and login with their Facebook identity. It automatically registers new users and logs in existing ones.

Current extension is compatible with latest Magento CE 1.6, but also with older 1.5, 1.4 and 1.3.2.x versions. It’s using brand new Facebook thingies like open graph protocol and open source JavaScript SDK.

If you’re interested to see additional languages in future releases, help us translate it by following instructions.

Facebook App

For Facebook Connect to work you need to Setup Application on Facebook and obtain its App ID/API Key and Application Secret.

Use your store name as application name and read and accept terms of service. On second screen set App Domain and Site URL(under checked Web Site tab), both to the store domain where you plan to implement Facebook Connect. Save Changes. Other Connect settings are optional, but you might want to add store logo for example.

Magento Setup

Once you obtain two keys navigate to Magento Administration, copy/paste them to appropriate fields under Configuration->Customer->Facebook Connect, set Enabled to Yes and you’re good to go. If you’re updating from previous releases, you also need to Enable it to work.

Default template files (frontend/default/default/template/facebook/*) and layout (layout/facebook.xml) makes Facebook Connect work out of the box with default theme, but we tried to make customizations as easy as possible so all you need to do is add button or link with “facebook-connect” rel attribute set anywhere in the theme, static block or cms page, for example:

<button rel=”facebook-connect” class=”form-button” type=”submit”><span>Connect with Facebook</span></button>
<a rel=”facebook-connect”>Connect with Facebook</a>

Latest Changes

v.0.9.9
– Client and javascript compatible with new Facebook authentication changes.
– Event.fire changed to document object to avoid javascript conflicts.
– Asking for user_birthday permission from now on.
– Norwegian translation added thanks to Magnus Alexander.

v.0.9.8
– Version fix, licenses added, connect release.

v.0.9.7
– Estonian, Swedish, Czech, Turkish and Korean translations added thanks to Sir Mull, Andreas Karlsson, Pavel Hrdlicka, ea and COBAY.

You made it all the way down here so you must have enjoyed this post! You may also like:

Social Connect Magento extension Marko Martinovic
Marko Martinovic, | 399

Social Connect Magento extension

Google Connect Magento extension Marko Martinovic
Marko Martinovic, | 60

Google Connect Magento extension

Building a “Facebook Like” button extension for Magento in 15 minutes Branko Ajzele
Branko Ajzele, | 9

Building a “Facebook Like” button extension for Magento in 15 minutes

608 comments

  1. Hello guys,

    Can solve 90% of the problem
    :
    He made the following changes:

    Replacing the 86 line of the file:

    app \ code \ community \ Inchoo \ Facebook \ controllers \ Customer \ AccountController.php

    With this code:

    $ StandardInfo = $ this -> _ getSession () -> getClient () -> call (“/ me”, array ( ‘fields’ => array (’email’, ‘first_name’, ‘last_name’, ‘gender’)) );

    Replacing the 152 and 198 line of the file:

    app \ code \ community \ Inchoo \ Facebook \ Model \ Client.php

    “SetParameterPost” to “setRawData”

    And in the file:

    app \ design \ frontend \ rwd \ default \ template \ facebook \ init.phtml

    I added the script from the beginning:

    jQuery.noConflict ();

    After making these changes the following happens:

    1- click connect with facebook
    2 appears the phrase “Failed to connect to Facebook”
    3 But if I click again login works
    4 So to solve my problem for now I changed the phrase “Failed to connect to Facebook” to “connection is established, click CONNECT WITH FACEBOOK to login”

    Hugs,
    Fernando

    1. But tests performed and sometimes need to click more than 5 times for the connection to work, what do you connect with only one click?

  2. When I am using your app on my Magento 1.9, getting this error when trying to login using facebook :

    “Facebook profile can’t provide all required info, please register and then connect with Facebook for fast login.
    Please make sure your passwords match.”

    need help.

  3. If anyone is still having trouble with the error “Facebook connection failed. Email address is required.”. Find the line 86 in AccountController.php and replace it with $standardInfo = $this->_getSession()->getClient()->call(“/me”, array(‘fields’=>array(’email’, ‘first_name’, ‘last_name’, ‘gender’)));

  4. “I can’t use facebook login, when i click on sign in with facebook, facebook ask to fill up username / password.i filled up and it redirect to login page with message “Customer email is required”.”
    I have the same error as another guy. Any ideas why is this happening ?

    Thx

  5. i have installed this extension, but its giving me an error. “Facebook connection failed.” i already do the correction. “setParameterPost” with “setRawData”. Still same error, Please help

  6. Hi.

    How to redirect to homepage after login.
    I managed to redirect to homepage after login for default Magento login, but not for this facebook connect.

  7. When I am using your app on my Magento 1.9, getting this error when trying to login using facebook :

    “Facebook profile can’t provide all required info, please register and then connect with Facebook for fast login.
    Please make sure your passwords match.”

    need urgent help.

  8. HI Ivan,
    When we click on facebook connect , in console we are getting the following error as given below

    TypeError: element.getAttribute is not a function
    return element.getAttribute(name);

    when we try

  9. Hello, I m trying this wonderful extension. It’s working perfectly for Google, Twitter login on 1.7.0.2.
    But , i can’t use facebook login, when i click on sign in with facebook, facebook ask to fill up username / password.i filled up and it redirect to login page with message “Customer email is required”.
    May I Know How can i solve this problem Please.
    Thanks you so much ,developers.

  10. Hello,
    Thanks for the module.
    I am working on Inchoo_Facebook-0.9.9 on my site, i want to stop the auto login after logout with the facebook.
    Please help me.

  11. Hello,
    I want to add the “connect with facebook link” at the top header menu behind the login menu, for this in which files i will make changes.

    Thanks…

  12. Mine is not working. I want it to show up on my homepage yet it is showing up underneath my products page, and it’s transparent and doesn’t look right at all. I don’ t get what I’m doing wrong.

    store.purelyorganicsa.com

  13. Hello Ivan i would like to know if version 0.9.9 is working with magento version 1.8.1.0? Thank you for your time and help?

  14. Hello all,

    Small security bugfix of the extension was just released.

    I strongly suggest that developers check my last Github commit. If you’re using 0.9.9 version from this page, just re-download zip and deploy, it’s patched.

    Greets to Patrick for reporting the problem. Even though extension isn’t maintained anymore, I’m told that extension and parts of the code are still used here and there, so we did our best to help out.

    Regards,
    Ivan

  15. Hi guys,

    If you’re getting the “Facebook connection failed. Service temporarily unavailable.” on Magento 1.9 you need to edit the “app/code/community/Inchoo/Facebook/Model/Client.php” file and replace the “setParameterPost” with “setRawData”.

    It should be on lines 152 and 198.

    Cheers!

    1. Hi I get the message Facebook connection failed. Service temporarily unavailable.
      I do the changes as you told but no success.
      My Magento version is 1.9.1.0
      Please Help

  16. Sorry, login failed to reach facebook servers. Please check your network connection or try again later.
    (Connection_ Failure
    Connection_Failure
    (Com.facebook.fbservice.service.ServiceException)
    Whatever the problem is written above. Please tell me the resolution of the problem. It stopped working suddenly, as it was working good before. So please help me. Even i have uninstall and reinstall the fb app again. But it is not working still……

  17. hi I installed and working well for first registration. if m trying to logging again it showing error like account not activated. what I have to do to solve this. please help. thanks in adv.

  18. Does anybody know how to remove the connect with facebook in the top links section? Any help is much appreciated.

  19. i want to install facebook connect to my magento store but not getting where to downlaod and not getting path where to install can anyone help me

  20. Hi, I’m having a trouble with facebook connect, after i log in the error message is “Facebook connection failed. Email address is required.”

    Please help me.

    Thanks,
    Roldan

  21. Is anybody else receiving this error:

    Fatal error: Maximum execution time of 45 seconds exceeded in /home/rMYSITE/public_html/app/code/core/Mage/Core/Model/App.php on line 814

    I cant seem to fix it

  22. For those who are facing the “Fail to connect to facebook” problem:

    Add on the first line of /app/design/frontend/yourtheme/default/template/facebook/init.phtml:

    jQuery.noConflict();

    AND in /js/ search for js-1.x.x.min.js and add at the last line, to the bottom:

    jQuery.noConflict();

    This is a conflict with other modules or even your own template that uses jquery also.

  23. For those who are facing the “Fail to connect to facebook” problem:

    Add on the first line of /app/design/frontend/yourtheme/default/template/facebook/init.phtml:

    jQuery.noConflict();

    AND in /js/ search for js-1.x.x.min.js and add at the last line, to the bottom:

    jQuery.noConflict();

    This is a conflict with other modules or even your own template that uses jquery also.

  24. This is working awesome in my localhost machine, how this facebook login include in the checkout pages like your google connect plugin. or i have to just paste that button code in my check out pages.

  25. This is not working properly in Magento CE 1.7.0.2.

    after login with facebook it is not redirecting to another page and entry is not made in magento. i mean to say after facebook login it does not login from magento.

  26. We’re testing this extension in our dev environment. I went through the process of installing with no problems, added the ID and secret key in config and even added var jQuery.noConflict(); to the init.phtml file and it is still not working. is not being rendered on the page that I can see. Any ideas?

  27. Hi..
    First of all thanks for this lovely extension.i am wandering that if somehow i able to get profile pic from facebook and display it at home page.Hope you will help me.
    Thanks in advance!

  28. Ivan, or anyone,

    Unfortunately I’ve had to uninstall this great extension. I have succesfully removed all extension files from the server, but I also want to remove all changes that were made to the database.

    I already removed the attribute [b]’facebook_uid'[/b] from the table ‘eav_attribute’. Does this extension make more changes to the database or is this all?

    Thanks in advance!

  29. Hi,
    Can somebody help me, i installed this app it’s working with default theme, custom theme doesn’t work, please help me!!! What i’m doing wrong??? :(((

  30. This worked out of the box on my site. I’ve been trying to get a Facebook login button to work for a while and thought I was going to have to figure it out from scratch but this module works great. I just had to fix my button (but it worked) –I was going to customize it anyway.

    Thanks

    Oh by the way I have Magento ver. 1.7.0.2

  31. Great extension. Our FB Connect button stopped rendering a few days ago. I assume FB has changed something? The connect link still works great but there’s no graphical button, just a hyperlink. Has anyone else experienced this? Thanks.

  32. Work great, only thing is if the extension give us a chance to customize the button connect then it will be perfect. For example it will support 10 buttons connect template and we can choose one to match with our template. Thanks

  33. @umair

    the file path to “init.phtml” is “/app/design/frontend/default/default/template/facebook”

    a added ” jQuery.noConflict();” and it worked!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.

Tell us about your project

Drop us a line. We'd love to know more about your project.