The "Sign in with Facebook" feature set-up in an X-Cart store consists of the following steps:

Creating a Facebook App

To create an App for Facebook login:

  1. Go to the Apps page of the developers' section of Facebook and sign in with your Facebook username and password.

  2. Click on the button + Add a new app:

    facebook-add-new-app.png

    A popup titled "Create a New App ID" will be displayed.

    facebook-new-app-popup.png

  3. Enter a name for your App into the Display Name field (this will be the user-facing name of your App; using your store name is recommended).


    Provide a valid email address (used for important communication about your App) in the Contact Email field.

    Click Create App ID.

  4. On the App Products screen, select Set Up for the Facebook Login product:

    facebook-fb-login-setup.png

  5. Choose the Website platform:

    web.png

    That will start a wizard that will help you complete your app configuration.

  6. On the first step of the wizard, enter your site URL and click Save and Continue:

    quickstart.png

    The following steps are already integrated into the Social Login add-on. You can skip them.

  7. Locate the Settings -> Basic section in the left menu and open it to see the app details:

    facebook-basic-settings.png

    Fill in the form fields for your App and click Save changes.

  8. Copy your App ID and App Secret to use later in the configuration of the Social Login add-on.

  9. Locate the Facebook Login -> Settings section in the left menu and specify the "Valid OAuth Redirect URIs" field value. It should be of the kind - https://YOUR_XCART_STORE_URL/?target=social_login&action=login&auth_provider=facebook

    facebook-fb-login-settings.png

    Click Save changes.


    Make sure you configured the store to use HTTPS (X-Cart Admin -> System Tools -> HTTPS Settings). Otherwise, the Facebook Login feature won't work.


  10. Since your App is now in development mode, you need to go live with it.

    To do so, switch the In Development toggle to Live to make your App available to the general public:

    facebook-app-in-development.png

    Your App is now published:

    facebook-app-live.png

That is all. Your Facebook App has been configured.

Configuring the Social Login Add-on: Facebook

Once you have created and configured your Facebook App, you will need to obtain two pieces of information: your Facebook App ID and App Secret. These will need to be entered in X-Cart so the add-on can connect to the App you created on Facebook and generate the Facebook login widget code correctly.

You can find the Facebook App ID and App Secret on the Settings -> Basic page for your App (You will need to click the Show button and enter your password to reveal the App Secret):

facebook-basic-settings.png


We recommend opening your X-Cart Admin interface in a separate browser tab or window so you can copy and paste the App ID and App Secret values from Facebook to X-Cart.


To configure the add-on:

  1. Locate the entry for the Social Login add-on on the My Apps page of your store's Admin area (App Store -> My Apps) and click the Settings link below it:

    The "Social Login" add-on settings page will open.

    540-settings-page.png

  2. On the "Social Login" add-on settings page, complete the Facebook App ID/API Key and Facebook App Secret fields with the Facebook App ID and App Secret values you obtained on Facebook.


    The "Social Login" add-on can also request user location information, requiring additional Facebook approval. That allows X-Cart to automatically fill the address upon user login (if a user has specified the location on Facebook). You can disable this feature by using the Request user location checkbox.


  3. After you've configured the Facebook section, click the Submit button near the bottom of the page to save the changes.

    The "Login with Facebook" feature should now be enabled.

Related pages:

Did this answer your question?