> For the complete documentation index, see [llms.txt](https://mobidonia.gitbook.io/mresto/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobidonia.gitbook.io/mresto/define-basics/facebook.md).

# Facebook authentication

Visit [Facebook for developers](https://developers.facebook.com/).

Create new project.

![](/files/-M4LJL6KPbpfcpZFuPgm)

Click **Create App** and fill the information for your project.

![](/files/-M4LJm1qRGCOeos1caFV)

From the left menu click **Settings** and select **Basic**.

![](/files/-M4LJymr633hsaOqGPmb)

Enter the information for your project.

![](/files/-M4LKLU4Y_xojhx6TqXI)

Next after you finish with this scroll to the bottom, click **Add platform** and select **Website.**

![](/files/-M4LL29T9vfxPs2qqZ_t)

![](/files/-M4LKvNdf80B-h04i5H5)

Now enter your website URL.

![](/files/-M4LLd6495EXTkEz7PZw)

Next from the left menu in Product section find **Facebook Login** and under select **Settings**.

![](/files/-M58y6_IifIupLdrE3jm)

Find **Valid QAuaht Redirect URIs** and enter your redirect URL.

{% hint style="info" %}
Note: The redirect must be defined like in the picture below.&#x20;
{% endhint %}

![](/files/-M58yGQ6sLE_bKcMhx1-)

The last step you need to do is to switch the mode of your app from development to live.

![](/files/-M58zE0TCsHfAcxzBkiz)

Copy **App ID** and **App Secret** and add this values in the .env file.<br>

```
FACEBOOK_CLIENT_ID="" //Used for facebook login
FACEBOOK_CLIENT_SECRET="" //Used for facebook login
FACEBOOK_REDIRECT="" //Used for facebook login
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://mobidonia.gitbook.io/mresto/define-basics/facebook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
