-
Notifications
You must be signed in to change notification settings - Fork 275
Chat SDK iOS: Facebook login
simonsmiley64 edited this page Feb 10, 2017
·
5 revisions
##Configuring the Chat SDK 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
- Open the
chat_sdk -> facebook
and add your AppID in theapp_id
field - Add the AppID in the
FacebookAppID
field in the plist - Open
URL types -> Item 0 -> URL Schemes
and then add your AppID with "fb" at the front (e.g. fb0123456789).
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