| Package Data | |
|---|---|
| Maintainer Username: | AndrewNovikoff |
| Maintainer Contact: | andrewnovikofff@gmail.com (AndrewNovikof) |
| Package Create Date: | 2017-08-17 |
| Package Last Update: | 2019-01-22 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-27 03:01:52 |
| Package Statistics | |
|---|---|
| Total Downloads: | 1,011 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
composer require andrewnovikof/facebookserviceprovider
Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already.SocialiteProviders\Manager\ServiceProvider to your providers[] array in config\app.php.For example:
'providers' => [
// a whole bunch of providers
// remove 'Laravel\Socialite\SocialiteServiceProvider',
SocialiteProviders\Manager\ServiceProvider::class, // add
];
Add SocialiteProviders\Manager\SocialiteWasCalled::class event to your listen[] array in <app_name>/Providers/EventServiceProvider.
Add your listeners (i.e. the ones from the providers) to the SocialiteProviders\Manager\SocialiteWasCalled[] that you just created.
The listener that you add for this provider is AndrewNovikof\SocialiteProviders\Facebook\FacebookExtendSocialite::class.
Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.
For example:
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
SocialiteProviders\Manager\SocialiteWasCalled::class => [
AndrewNovikof\SocialiteProviders\Facebook\FacebookExtendSocialite::class
],
];
Add to config/services.php:
'facebook' => [
'client_id' => env('FACEBOOK_ID'),
'client_secret' => env('FACEBOOK_SECRET'),
'redirect' => env('FACEBOOK_REDIRECT'),
],
Append provider values to your .env file:
Note: Add both public and secret keys!
// other values above
FACEBOOK_ID=your_app_id_for_the_service
FACEBOOK_SECRET=your_app_public_for_the_service
FACEBOOK_REDIRECT=https://example.com/login