Facebook Connect

This page explains how to create a Facebook Application and connect it to your ReachFive account.

To use Facebook as a social login provider, you will need an App ID and App Secret from your Facebook app. Then, you’ll need to copy these keys into your ReachFive settings.

Create a Facebook application

  1. Go to https://developers.facebook.com, login with your account and create a new app.

  2. Name your application.

  3. Provide a Display Name and a Contact Email. Choose a Category and click Create App ID.

  4. In Settings  Basic, select App Icon, Privacy Policy, Terms of Service URL, Category and Business Use.

  5. Save your changes.

Set up the Facebook login

Go back to your dashboard. Scroll down Click on PRODUCTS. Then choose Set Up the Facebook Login Product (left panel).

facebook create app home

Go to Facebook Login.

Use the left-hand navigation to go to Settings (do not use the Quickstart you arrive on by default).

You will have access to Client OAuth Settings for Facebook Login.

facebook create app id

In the Valid OAuth redirect URIs, enter https://{REACHFIVE_DOMAIN}/login/callback where REACHFIVE_DOMAIN is your ReachFive domain.

Click Save Changes.

Validate your Facebook app - permissions

Before you can ask users to share some of their data, your app must go through the App Review. Specifically, you ask Facebook to grant selected permissions.

During this validation process, you must demonstrate that those data are useful for your business, and used to improve your customers experience.

These permissions are granted by default:

  • default

  • email

This permission is mandatory to use Analytics  Page Likes and Interests in the ReachFive Console.

To get additional permissions, you must go through the App Review:

  • user_gender

  • user_age_range

  • user_link

  • user_birthday

  • user_location

  • user_hometown

  • user_friends

  • user_likes

  • user_photos

  • user_videos

You also need "Page Public Content Access" to use Analytics > Page Likes and Interests in the ReachFive Console.

Validate your Facebook app - how-to

  1. Choose a hidden URL from your website to implement our Facebook connect Widget. It must be an externally accessible page.

  2. Add our widget with the following snippet.

    (function() {
    var g = document.createElement('script'); g.type = 'text/javascript'; g.async = true;
    g.src = '//REACHFIVE_DOMAIN/js/og.js'; (1)
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(g, s);
    })();
    1 Replace REACHFIVE_DOMAIN with your own domain.
  3. Create your scenario of how the data will be used.

  4. Create the associated segments.

  5. Go to Login pop-up, then add a title and toggle the pop-up on.

  6. Go to Recommender, then click New rule.

    Set up the rule with your scenario, select the segment, and product to recommend (Link). Add as many rules as you need for each permission.

    facebook permission example
  7. Screen video for each scenario.

    Remember to delete your application in your Facebook account between each video. Go to your Facebook Profile  Parameters  App, and website then check your application and delete it.

  8. Go to https://developers.facebook.com, then App Review  My permissions and Features, then select Add additional permissions and features.

  9. Choose the permissions you want to add, then click Continue.

  10. For each permission, specify the required information, type in your scenario, and upload your screencast.

To submit permissions review while your application is already live, you will have to create a test app to capture the screencast with all the permissions.

Make the app public

Next, look on the top of the page, and click on "OFF" or "DESACTIVÉ".

Then select a category on the pop up and Confirm.

facebook make app public

The grey toggle that displayed "off" will turn green and display "on". Your Facebook application is now live.

Configure Facebook as Provider on ReachFive

First, get your Facebook App Id and App Secret : go to Settings > Basic and click to Show to reveal the App Secret.

facebook oauth client

On the ReachFive Console, go to Settings > Providers. Click on Add provider and Choose Facebook.

facebook app id secret

Copy your Client ID and Client secret from the Facebook settings page. Click on permissions and add:

  • public_profile

  • user_gender

  • email

Then activate the slider named "Visible“ and hit SAVE.

facebook visible

Wrap-up

That’s all you need to integrate your ReachFive account with your Facebook application.

You only need to have your Facebook Application validated to go live.

If you want to implement your own button instead of the widget, follow the Facebook Guidelines.

For best practices about Login permissions read the Facebook recommendations.