Configure Facebook Login

How to set up Facebook login. To make life easier for your users, they can use Facebook to create an account in your marketplace.

Sharetribe avatar
Written by Sharetribe
Updated over a week ago

The following instructions only apply to Sharetribe marketplaces.
If you don't have a Sharetribe website, these instructions won't apply, and you should contact your own service provider.

In your Sharetribe marketplace, users can create a user account and log in using their Facebook account. When using their Facebook credentials, users don't need to remember a separate username and password for your marketplace based on Sharetribe. Their profile picture is automatically imported from Facebook. 

If you want to, you can also enable the same feature for Google Sign-In and LinkedIn Sign In.
 
To enable that feature in your Sharetribe marketplace you will need to create a Facebook App and configure your marketplace to use this app. Creating a Facebook app is free. Follow the instructions below to set this up. 

IMPORTANT! When creating a Facebook app for your marketplace, please do NOT add anything that is not specifically indicated in these instructions. Doing so might create some issues and prevent you from finishing the setup. There are some fields that you may add optionally, like some specific URLs, but to ensure a smooth app creation, it is better to add them after you have finished with the initial setup.

Create and set up a Facebook App

  1. Create an account (you may have to register as a developer).

  2. Make sure you are logged in.

  3. Click on the "See all apps" dropdown in the top right corner of the header, next to your profile picture.

  4. Click "Create App". A popup asking "Select an app type" should appear.

  5. Choose the last option: "None".

  6. Type your App Display Name. For example: "My Great Marketplace".

  7. Enter the contact email of your choice.

  8. Click "Create App". You may have to answer a security check.

  9. Don't select a Product or Recommended Product but instead...

  10. ... In the left-hand menu, click "Settings" then "Basic".

  11. In "App Domains", add all the domains from which you want the Facebook login to work, i.e., all your marketplace domains. If you are moving between a Sharetribe subdomain and your custom domain, it's best to add both here to ensure that the Facebook login keeps working even when the domain changes. Add the domains without "https" or "www" or "subdomain":
     - For your custom domain (in the Pro/Growth/Scale plan), the domain could be: example.com
     - For your Sharetribe subdomain (in a trial or Starter or Hobby plan), the domain could be: example.sharetribe.com

  12. Scroll down and click "Add Platform".

  13. Select “Website”.

  14. In "Site URL", add your full marketplace's URL with https and possibly www or the subdomain:
     - If you are on a Pro/Growth/Scale plan, it could be: https://www.example.com,
    https://example.com, or https://something.example.com.
     - If you are on a trial, Starter or Hobby plan, it could be: https://example.sharetribe.com

  15. Click "Save Changes" at the bottom right.
    If you can't save because the "App Domains" part complains about "This must be derived from Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL or Secure Page Tab URL. Check and correct the following domains: (missing-domain-here.com)", this is probably because you added two different domains while following the instructions above and only one is based on the current Site URL that you entered. The easiest way to overcome this limitation is to add a Secure Page Tab URL with the following steps:
     - Click "Add Platform"
     - Select "Page tab"
     - In "Secure Page Tab URL" add the missing domain (mentioned in the earlier error message) with https, e.g., "https://missing-domain-here.com"
     - Click "Save Changes"

  16. You might also need to add your privacy policy URL (in some cases, this is not needed). If so, please add it by typing your complete URL followed by "/infos/privacy":
     - If you are on a Pro/Growth/Scale plan, it could be: https://www.example.com/infos/privacy or https://something.example.com/infos/privacy.
     - If you are on a trial, Starter or Hobby plan, it could be: https://example.sharetribe.com/infos/privacy

  17. Save changes if needed.

  18. In the left-hand menu, click "Add Product".

  19. Scroll down to find a list with "Facebook Login" and click "Set Up".

  20. Select "Web" (www) in the list of options.

  21. Verify that your "Site URL" is correct and click "Save" then "Continue".

  22. In the left-hand menu, click "Facebook Login" then "Settings".

  23. Check that the following settings are correct:
    - Client OAuth Login: Yes
    - Web OAuth Login: Yes
    - Force Web OAuth Reauthentication: No
    - Use Strict Mode for Redirect URIs: Yes
    - Enforce HTTPS: No (if set to 'yes' without possibility to edit, leave it as 'yes')
    - Embedded Browser OAuth Login: Yes
    - Login from devices: No

  24. In the "Valid OAuth redirect URIs" field, add your marketplace address followed by /people/auth/facebook/callback :
    - If you are on a Pro/Growth/Scale plan, it could be: https://www.example.com/people/auth/facebook/callback or https://something.example.com/people/auth/facebook/callback.
     - If you are on a trial, Starter or Hobby plan, it could be: https://example.sharetribe.com/people/auth/facebook/callback

  25. Check that the section "Deauthorize / Deauthorize Callback URL" is empty.

  26. Click "Save Changes".

  27. From the top bar, turn the top switch from "In development" to "Live" to make your app live.

  28. Confirm the choice when asked. You may have to select a category and/or answer a security check. Your app doesn't require Facebook approval, so you don't have to go through the submission process.

  29. In the left-hand menu, click "Dashboard". Your app should be public, and a green dot should be displayed.

Your app is now created, configured, and live. But this isn't finished yet!
You now have to configure it in your marketplace to use it.

Configure your Facebook App in your marketplace

You'll have to copy some information about your app from Facebook to use it within your marketplace. If you haven't created an app on Facebook yet, please follow the instructions above.

  1. Open the app you created via the "Apps" dropdown in the upper-left corner.

  2. In the left-hand menu, click "Settings" then "Basic".

  3. Copy the value in "App ID". It's a long chain of characters (numbers and sometimes letters too).

  4. Log in to your marketplace. You must be logged as an administrator.

  5. Go to the "Users / Signup & Login" page of your Admin panel.

  6. Find the "Facebook Login" section.

  7. In "Facebook App ID", paste the value "App ID" you copied earlier.

  8. Go back to your app on Facebook, in the "Settings" then "Basic section.

  9. Click the "Show" button in the "App Secret" field. You may have to answer a security check.

  10. Copy the value in "App Secret". It's a long string of letters and numbers.

  11. Go back to the "Social media" settings in your marketplace.

  12. Paste the copied "App Secret" string into the "Facebook App Secret" field.

  13. Click "Save settings".

That's it! Facebook Login is now active and set! Users will now see your Facebook App's details when they create an account or log in to your marketplace using their Facebook credentials.
 
You now should take a few more moments to customize your app on Facebook.

Customize your Facebook App

When users create an account or log in with Facebook Login for the first time, they will be asked to authorize your app. At this point, they will see your Facebook App's logo. You should customize it to match your marketplace. Doing this helps users trust your app.

  1. Open the app that you created via the "Apps" dropdown.

  2. In the left-hand menu, click "Settings" then "Basic".

  3. Upload your App icon in the correct section according to Facebook's instructions.

  4. Click "Save Changes" at the bottom right.

Did this answer your question?