red-dot/facebook-sso
Composer 安装命令:
composer require red-dot/facebook-sso
包简介
A PHP package for Facebook Single Sign-On (SSO)
README 文档
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
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-06