Facebook#

Follow the below steps to connect to the Facebook API.

Connect to the Facebook API#

  1. Go to the Meta for Developers page.
  2. Click the Create App button.
  3. Select Other and Consumer as the app type, and fill in the rest of the details.
  4. Once created, in the left-hand sidebar, click the Add Product button and select Facebook Login.
  5. Select Web as the type and your website address into Site URL.
  6. Navigate to Facebook Login section in the left-hand sidebar, click Settings.
  7. For the Valid OAuth Redirect URIs setting, enter the value from the Redirect URI field in Social Login.
  8. Click the Save Changes button.
  9. Navigate to App ReviewRequests.
  10. Switch the App Mode toggle to Live.
  11. Click Request Permissions or Features.
  12. Locate the public_profile permission and click the Get advanced access button.
  13. Locate the email permission and click the Get advanced access button.
  14. Navigate to App SettingsBasic item in the left-hand sidebar.
  15. Enter your domain name to the App Domains field.
  16. Fill in the Privacy Policy and User Data Deletion fields as applicable.
  17. Click the Save Changes button.
  18. Copy the App ID from Facebook and paste in the Client ID field in Social Login.
  19. Copy the App Secret from Facebook and paste in the Client Secret field in Social Login.

Ensure that you pick Facebook Login and not Facebook Login for Business, which are different products. If you must use Facebook Login for Business, you'll need to provide additional scopes, as per the below.

Facebook Login for Business#

If you require the use of the Facebook Login for Business product in your Facebook App, you may do so, but note that you'll need to supply additional scopes in your configuration.

<?php

return [
    '*' => [
        // ...
        'providers' => [
            'facebook' => [
                // ...
                'scopes' => [
                    'business_management',
                ],
            ],
        ],
    ]
];

Previous ← Apple Next GitHub →