Set up Facebook as an identity provider
Overview
This guide helps verified Facebook developers connect Facebook Accounts to AccelByte Gaming Services (AGS). You may need to set up additional features within Facebook services that we haven't listed here. For full information about setting up Facebook services, we recommend contacting your Facebook representative and reviewing Facebook documentation.
Goals
Enable the Facebook authentication method for your publisher website with the AccelByte Player Portal.
Prerequisites
- A Facebook Developer Account. Follow this link to create a new account, or log in to your existing account https://developers.facebook.com/async/registration/
- An AccelByte Admin Portal Account to set up authentication and manage permissions.
- A publisher Namespace for your Player Portal and Launcher.
- A Player Portal.
Set up the Facebook app
Create a Facebook application
Create a Facebook Application under your Facebook Developer Account. Follow the Create an App Guide
Add a Facebook login product to your app
Add a Facebook login product to your app. Follow the Facebook Login for the Web with the JavaScript SDK Guide.
Set up advanced access
Request advanced access to public_profile permissions. For more detail about Facebook permissions, refer to the Facebook Permissions Reference Page.
If you have trouble setting up on the Facebook Developer Portal, contact Customer Support to get a guide from AccelByte.
Set up a Web login for Facebook
Use these steps to set up Facebook logins for the Player Portal and enable players to sign in to your player portal with their Facebook accounts.
Configuration steps
In the AGS Admin portal, go to your publisher namespace.
On the sidebar menu, go to Game Setup > 3rd Party Configuration > Auth & Account Linking.
On the Login Methods page, click on the + Add New button.
From the list of login method options, select Facebook.
Fill the Client ID field with your Facebook App ID, Client Secret with your Facebook App Secret, and Redirect URI with your Facebook login redirect URI:
<BaseURL\>/iam/v3/platforms/facebook/authenticate
(BaseURL is your domain address, e.g: https://development.accelbyte.io).The system redirects you to the Detail page; activate and use it.
Test your login
Go to your Player Portal and click Login.
Click the Facebook Icon. If you can't find it, click More login options.
The system redirects you to the Facebook Web Login page.
Fill in your Facebook credentials to proceed.
That's it! You've completed the required steps.
![Facebook Login](../../../images/services/01_access/03_auth/facebook/08_facebooklogin.png)
The system asks players to link their Facebook account with an existing or new AccelByte account. AccelByte is working to make this configurable, so that players can log in to the Player Portal with a headless account.
Troubleshooting
You can find common errors and issues along with recommendations on how to resolve them in this section.
Can't get advanced access
You can't get Advanced Access if you don't list a valid Privacy Policy URL and data deletion information in Basic Information.
Failed login via Facebook
If you use Development Mode, ensure you log in using Test User or Real User accounts with the Tester role.