> ## Documentation Index
> Fetch the complete documentation index at: https://docs.droidoxy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Login

> Seamlessly integrate Facebook OAuth 2.0 authentication into your Pocket Script application, allowing users to log in with their Facebook accounts. This guide walks you through the setup process, from creating a Facebook App to configuring Pocket Script for a smooth "Login with Facebook" experience.

## Overview

Integrating Facebook as an identity provider offers your users a convenient and secure way to access your Pocket Script application. This feature leverages Facebook's OAuth 2.0 protocol, ensuring a streamlined authentication process while maintaining high security standards.

<Warning>Your domain must have a valid SSL certificate installed for the Facebook login to work</Warning>

## Getting Facebook App ID and Secret Key ?

1. Log in to [Facebook for Developers](https://developers.facebook.com/) and either select an existing app or create a New App

   <Note>if you already have an existing app then **skip to step 3**</Note>

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_1.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=2e9389c9579c24804ad225753e34cdb2" alt="Facebook Console 1" width="3214" height="1220" data-path="images/web/fb/facebook_console_1.png" />

2. Create a New App

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_2.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=b4e67e1c1295de4873c29abe2dd30d26" alt="Facebook Console 2" width="3204" height="1202" data-path="images/web/fb/facebook_console_2.png" />

3. Then Setup Facebook Login

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_3.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=33bf65f46aedce0aa2d18d8daac12be0" alt="Facebook Console 3" width="3241" height="1220" data-path="images/web/fb/facebook_console_3.png" />

4. Select `Web` as we are configuring Facebook login for the web version

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_4.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=ef5e805b4e91a2d43295ab1124ae4e35" alt="Facebook Console 4" width="2614" height="682" data-path="images/web/fb/facebook_console_4.png" />

5. Give your site URL and click on `save`

   * You can ignore the other quickstart steps
   * Navigate to `Settings -> Basic` on the sidebar

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_5.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=95a99fcf7b3ed95e4aa080552b839e3a" alt="Facebook Console 5" width="3222" height="1576" data-path="images/web/fb/facebook_console_5.png" />

6. Simply copy your `App ID` and `App Secret`

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_6.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=b857ee08de4eae60c46e5b64021d7095" alt="Facebook Console 6" width="3222" height="1192" data-path="images/web/fb/facebook_console_6.png" />

7. Finally, Go to  **Facebook Login -> Settings**  (No. 4 in the above image) to add a valid **OAuth redirect URL** to finalize our settings

   <Warning>For Valid OAuth redirect URIs, append `admin/controller/oauth.php` to your website URL</Warning>

   * For the main domain install at ***example.com***, enter your URL as:

     ```
     https://example.com/admin/controller/oauth.php
     ```
   * For sub-domain install at ***subdomain.example.com***, enter your URL as
     ```
     https://subdomain.example.com/controller/oauth.php
     ```
   * For subfolder install at ***example.com/subfolder***, enter your URL as
     ```
     https://example.com/subfolder/controller/oauth.php
     ```

   <img src="https://mintcdn.com/droidoxy/kDuiTUHelTKsROIH/images/web/fb/facebook_console_7.png?fit=max&auto=format&n=kDuiTUHelTKsROIH&q=85&s=ce23396ff175ea12b3511b09c073003f" alt="Facebook Console 7 Pn" width="3196" height="1782" data-path="images/web/fb/facebook_console_7.png" />

## Final Steps

Paste the copied keys in your admin panel by following the steps below

* Log in to your Admin Interface (Pocket script instance)
* Navigate to `Settings -> Configuration -> Web App Configuration` from the admin sidebar
* Scroll down to the `Social Login` Section
* And paste the copied `Facebook App ID` and `Facebook Secret Key`

​That’s it!

## Need Help?

If you need any help or assistance, we're here for you! Please [reach out to our support team](https://droidoxy.com/support/)
