English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Configure Facebook Login

Last Updated on : 2022-03-25 13:10:52download

The OEM apps that are created on the Tuya IoT Development Platform use new settings starting from v3.7.0. This allows users to use the Facebook Login feature as expected after the update of Facebook’s Terms of Use. If your app version is earlier than v3.7.0, update the version on the Tuya IoT Development Platform and follow the steps in this topic to configure the Facebook Login feature.

Preparation

Log in to the Meta for Developers platform with a developer account. If the developer account is not registered, follow the Facebook documentation and register one before login to the platform.

Create an app

  1. In the top menu bar, select Create App from the My Apps drop-down list.

    Configure Facebook Login

  2. In the dialog box that appears, enter the following information:

    • Display Name: Enter an app name.

    • Contact Email: Enter your email address. Then, click Create App ID.

      Configure Facebook Login

  3. In the security check page that appears, enter the verification code as prompted and click Submit to create the app.

Enter the app information

  1. After the app is created, select Facebook Login and click Set Up to enable Facebook Login.

    Configure Facebook Login

  2. Go to Setting > Basic to see the values of App ID and App Secret. Both values are required for setting Facebook Login on the Tuya IoT Development Platform. To make this feature effective, set the following options:

    Configure Facebook Login

    • Privacy Policy URL: Enter the correct URL of the Privacy Policy (required).

    • Terms of Service URL: Enter the correct URL of the Terms of Service (required).

    • Category: Select Lifestyle (required).

    • Click Save Changes to save the settings.

      Configure Facebook Login

Add the Android platform

  1. Scroll down the page and click +Add Platform.

    Configure Facebook Login

  2. Select Android and click Cancel.

    Configure Facebook Login

  3. Set the following fields for Android:

    Configure Facebook Login

    • Google Play Package Name: the name of your app package. It must be the same as the package name that is used for the app on the Tuya IoT Development Platform.

      Configure Facebook Login

    • Class Name: the splash screen of your app. Set the value to com.tuyasmart.sample.TuyaSplashActivity.

    • Key Hashes: the key hashes for verifying the app signature. To get the content, go to Tuya IoT Development Platform > App > OEM App > Optional Setting > Third-Party Integration.

      Configure Facebook Login

      Scroll down to the Login Configuration for Android section and click Copy next to Key Hashes for Facebook.

      Configure Facebook Login

  4. Click Save Changes > Use this package name.

    Configure Facebook Login

Add the iOS platform

  1. Scroll down the page and click +Add Platform.

    Configure Facebook Login

  2. Select iOS and click Cancel.

    Configure Facebook Login

  3. Enter the Bundle ID of your app.

    Configure Facebook Login

    It must be the same as the Bundle ID that is used for the app on the Tuya IoT Development Platform.

    Configure Facebook Login

  4. Click Save Changes > Use this package name.

    Configure Facebook Login

  5. Set Status: Live to ON for your app before it can be launched.

    Configure Facebook Login

Request permissions

Click App Review > Permission and Features and request the permissions depicted in the following figure.

Configure Facebook Login

Configure Facebook Login on the Tuya IoT Development Platform

  1. On the Meta for Developers platform, go to Settings > Basic and copy the values of App ID and App Secret.

    Configure Facebook Login

  2. Go to Tuya IoT Development Platform > App > OEM App > Optional Setting > Third-Party Login, and paste the values in the previous step to the fields for Facebook.

    Configure Facebook Login

  3. Package your app again. Then, your app has Facebook Login configured.