# Facebook Gateway

Bagaimana cara menghubungkan dua channel facebook dalam satu aplikasi? dalam hal ini, 3Dolphins menggunakan fitur channel gateway. Fitur channel gateway memungkinkan data dari satu aplikasi melalui beberapa channel sesuai dengan halaman.&#x20;

Misalnya: Saat ada pesan dari pelanggan di Facebook page.

|                 | Customer Message                                         |
| --------------- | -------------------------------------------------------- |
| Facebook Page 1 | Hi, What is 3Dolphins Chatbot?                           |
| Facebook Page 2 | Hello, what are the advantages of the 3Dolphins chatbot? |

Pesan dari setiap page akan masuk ke aplikasi yang sama, kemudian pesan tersebut akan diteruskan ke channel gateway. Nah, channel gateway ini akan mengirimkan pesan pelanggan ke pesan channel yang sesuai denganFacebook Page-nya. Misal, ketika ada pesan di halaman facebook 1, maka channel gateway akan secara otomatis mengirimkan pesan tersebut ke channel facebook halaman 1.

![Channel Gateway](/files/-MUx7eGD_iWXQJ2puoHz)

Untuk menggunakan channel gateway, ikuti langkah-langkah ini:&#x20;

Pertama, mulai channel gateway, masukkan query **'/start-gateway.sh'**.

![Start Gateway](/files/-MX6dlprdsgyU7dMKxmO)

Settings webhook pada Facebook app. (Di menu sebelah kiri, pilih 'Webhooks', klik tombol **'Edit Subscription'**).

![Webhooks ](/files/-MUx5b2v9ugHfmdcIs0P)

Masukkan callback URL ‘<https://channel\\_url/gateway/callback’>.

![Callback URL](/files/-MUx5r39Yd3picLKPUBk)

Penjelasan komponen ‘page subscription’:

* **Callback URL**: URL yang dipanggil Auth setelah proses autentikasi.
  * Gunakan callback berikut ini: Callback URL: <https://channel\\_url/gateway/callback>
  * Contoh: <https://adapter.3dolphins.ai/facebook/callback>
* **Verify Token**: Label untuk token verification.
  * Contoh: Facebook Gateway

Untuk menghentikan channel gateway, masukkan query **‘/stop-gateway.sh’**.

![Stop Gateway](/files/-MX6drjA2XdOOrQH4mjo)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.3dolphins.ai/5.3.0-id/integration/chanel-connector/facebook/facebook-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
