red-dot / facebook-sso
A PHP package for Facebook Single Sign-On (SSO)
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/red-dot/facebook-sso
This package is auto-updated.
Last update: 2025-12-18 03:10:07 UTC
README
- Go to Facebook Developers
- Create your app
- Specify the Site URL where Facebook should redirect after a successful login
- Add additional permissions, if required, for retrieving information other than public profile.
- Note down the App ID and App secret.
- In your project, create a new
composer.jsonfile or update the existing one if you already have one. - Install from Packagist
composer require red-dot/facebook-sso:dev-main - Now, to use the FacebookSSO package in your project
- Include the Composer autoloader with
require_once __DIR__ . '/vendor/autoload.php';at the top of your PHP file. - Import the namespace
use RedDot\FacebookSSO\FacebookSSO;. - Create an instance of the FacebookSSO class
$facebookSSO = new FacebookSSO($clientId, $clientSecret, $redirectUri);. - Make sure to replace
$clientId,$clientSecret, and$redirectUriwith your actual values. - That's it! You can now use the FacebookSSO package in your projecs!
- Include the Composer autoloader with
- Check out the
examples/example-login.phpfile for usage reference.
Reference: Manually Build a Login Flow