Facebook Mobile
Scenario Introduction
Overview
GenAuth provides developers with a way to quickly jump to Facebook login and obtain user information in mobile (iOS or Android) applications. Facebook account access can be completed by simply calling the GenAuth mobile SDK.
Application Scenario
Mobile APP
End User Preview Image
Pull up the Facebook page in the mobile application to log in.

Preparation
If you don't have a Facebook account, please go to Facebook to register first.

Open the Facebook Developer Platform, please go to Facebook Developer Platform to log in, complete the account information according to the page prompts, and complete the registration.
If you have not opened a GenAuth console account, please go to GenAuth Console Console to register a developer account.
Configuration steps
Step 1: Create an application on the Facebook Developer Platform
- Create a Facebook application and obtain the application number and application key
After completing the registration and login of the Facebook Developer Platform, click "Create an application".

Select the application type and click "Continue".

After filling in the application display name and application contact email, click "Create App".

In Settings -> Basic, click Add Platform


In Settings -> Basic, check the App ID and App Key

In Products, set Facebook Login.

Android
Please refer to Facebook Login for Android — Quick Start
INFO
- You need to log in to your mobile app background to obtain Package name (Android app package name) and SHA-1 certificate fingerprint (Android app's SHA-1).
- It will take some time for the settings to take effect after being saved, please be patient.
iOS
Please refer to Facebook Login for iOS — Quick Start
INFO
- You can get Bundle ID in Apple Store Connect.
Step 2: Configure Facebook mobile login in the GenAuth console
- On the Social Identity Source page of the Atuhing console, click the Create Social Identity Source button to enter the Select Social Identity Source page.

- On the Identity Source Management->Social Identity Source->Select Social Identity page of the GenAuth console, click the "Facebook" identity source card to enter the Facebook login mode selection page.

- Select Facebook Mobile to enter.

- Please configure the relevant field information on the "Social Identity Source" - "Facebook Mobile" page of the GenAuth console.

Field Description Unique ID
- The unique ID consists of lowercase letters, numbers, and -, and is less than 32 bits in length.
- This is the unique ID of this connection and cannot be modified after setting. Display Name This name will be displayed on the button of the end user's login interface. Application ID Enter the application ID applied on the Facebook developer platform. In "Settings" -> "Basics", obtain the "Application ID". Application Key Enter the application key of the application applied on the Facebook developer platform. In "Settings" -> "Basics", obtain the "Application Key". Login Mode After turning on Login Only Mode, you can only log in to existing accounts, and cannot create new accounts. Please choose carefully. Account Binding When Account Binding is not enabled, a new user is created by default when a user logs in through an identity source; when Account Binding is enabled, users can be allowed to log in directly to an existing account through Field Matching.
Step 3: Development Access
Recommended Development Access Method: SDK
Pros and Cons: Simple operation and maintenance, GenAuth is responsible for operation and maintenance. Each user pool has an independent secondary domain name; if you need to embed it into your application, you need to log in using the pop-up mode, that is: after clicking the login button, a window will pop up with the login page hosted by GenAuth, or redirect the browser to the login page hosted by GenAuth.
Detailed access method:
3.1 Create an application in the GenAuth console. For details, see: How to create an application in GenAuth.
3.2 On the created Facebook identity source connection details page, open and associate an application created in the GenAuth console.

3.3 Experience Facebook third-party login on the login page (as shown in the [end user preview](#end user preview)).