Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Chat SDK iOS: Facebook login
The Chat SDK comes preconfigured on our test Facebook accounts meaning there is some configuration required to set up your own project.
NOTE: You will need to have a Firebase account already created to complete this tutorial
Create a Facebook Developers Account
- Go to the Facebook developers page
- Create a new app for your project
- Navigate to the Facebook app page
- Copy the Facebook AppID
Note: A guide can be found here. You only need to complete step 1.
Now you must configure your app with your Chat SDK project.
Open your projects Info.plist
chat_sdk -> facebookand add your AppID in the
Add the AppID in the
FacebookAppIDfield in the plist
URL types -> Item 0 -> URL Schemesand then add your AppID with "fb" at the front (e.g. fb0123456789).
Add a new item to the plist called
Array. Add a new entry
Navigate to the settings page of your Facebook developers account
- Click Add Platform, at the bottom of the screen, and select iOS
- Add the bundleID of your project to the iOS Bundle ID section
- Make sure you have a contact email on this page - without it Facebook login will not work.
Note: You can add multiple bundleIDs for a single Facebook app meaning you can use the same Facebook app for multiple versions of your project.
- Set single sign on to on
- Set deep linking to off
- Set Log in-app purchase events automatically to off
- Click the App Review tab and enable access by the general public
Configuring your Firebase account
- Navigate to your Facebook app dashboard
- Copy your AppID and App Secret
- Navigate to your Firebase dashboard
- Click your Firebase app
- Click Authentication and then SIGN-IN METHOD
- Open the Facebook row and enable Facebook authentication
- Enter and save your Facebook AppID and Secret
- Copy the OAuth redirect link and navigate back to your Facebook app dashboard
- If you do not already have a Facebook Login entry in the Products menu click Add Product. Else click Facebook Login
- Add your OAuth redirect to the Valid OAuth redirect URLs field
- Save your changes
Facebook is now configured to your custom Chat SDK project