# Facebook Business

## Create Facebook OAuth Application

1. Visit <https://developers.facebook.com/> and create a new OAuth application (or use your existing one).
2. Add **Facebook Login for Business** and **Marketing API** products.\\

   <figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-8c6f0ef65f78cbf2f7417be9982c3fe14c6a1360%2Fimage%20(149).png?alt=media" alt=""><figcaption></figcaption></figure>
3. Copy the **App ID** and **App Secret** a and paste it to your **Appmixer Backoffice -> Connector Configuration** page under the `appmixer:facebookbusiness` configuration ID as `clientId` and `clientSecret`, respectively:\\

   <figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-5fb5539bc4af3ebcb49f459b291c357d840dcab3%2Fimage%20(150).png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-39c1347a867f64acc4a6623dc6fa23ce7947013f%2Fimage%20(151).png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-0c96d6a8e63679399acd1a9f5c7846e70388166a%2Fimage%20(152).png?alt=media" alt=""><figcaption><p>Use App ID as clientId and App Secret as clientSecret</p></figcaption></figure>
4. Add your Appmixer tenant domains as your **App domains**:\\

   <figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-56d540267bc671159537907891929bcf2dcce5ad%2Fimage%20(153).png?alt=media" alt=""><figcaption></figcaption></figure>

   Note: replace YOUR\_TENANT with the name of your hosted tenant. If you're a customer on an Appmixer Self-Managed plan, you can have a completely custom domains that Appmixer runs on. Use your own domains instead.
5. Set the OAuth redirect URI under **Facebook Login for Business** / **Settings** to `https://api.YOUR_TENANT.appmixer.cloud/auth/facebookbusiness/callback`:\\

   <figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-6a71be1e6fad1407e5aec04ce1a32b6b7b3b1e04%2Fimage%20(154).png?alt=media" alt=""><figcaption></figcaption></figure>
