Steps Completed successfully:

1.install laravel socialite
'composer require laravel/socialite'

2.added to env file
FACEBOOK_CLIENT_ID=your_app_id
FACEBOOK_CLIENT_SECRET=your_app_secret
FACEBOOK_REDIRECT_URI=http://localhost:8000/auth/facebook/callback

3.added to config.services
'facebook' => [
    'client_id' => env('FACEBOOK_CLIENT_ID'),
    'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
    'redirect' => env('FACEBOOK_REDIRECT_URI'),
],


4.added to routes.web
use App\Http\Controllers\Auth\FacebookController;

Route::get('/auth/facebook', [FacebookController::class, 'redirect']);
Route::get('/auth/facebook/callback', [FacebookController::class, 'callback']);


5.executed command:
php artisan make:controller Auth/FacebookController


6.added code to created facebook contoller file:
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Laravel\Socialite\Facades\Socialite;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;

class FacebookController extends Controller
{
    public function redirect()
    {
        return Socialite::driver('facebook')
            ->scopes(['email'])
            ->redirect();
    }

    public function callback()
    {
        try {
            $fbUser = Socialite::driver('facebook')->user();
        } catch (\Exception $e) {
            return redirect('/login')->with('error', 'Facebook login failed');
        }

        $user = User::where('facebook_id', $fbUser->id)->first();

        if (!$user) {
            $user = User::create([
                'name' => $fbUser->name ?? 'Facebook User',
                'email' => $fbUser->email ?? $fbUser->id.'@facebook.com',
                'facebook_id' => $fbUser->id,
                'password' => bcrypt(Str::random(16)),
            ]);
        }

        Auth::login($user, true);

        return redirect('/dashboard');
    }
}



7.command executed:
php artisan make:migration add_facebook_id_to_users_table



8.Changed in DB Added FB ID Column to users table:
ALTER TABLE users
ADD facebook_id VARCHAR(255) NULL UNIQUE;


9.opened facebood migration file created and added the following:
public function up()
{
    Schema::table('users', function (Blueprint $table) {
        $table->string('facebook_id')->nullable()->unique();
    });
}

public function down()
{
    Schema::table('users', function (Blueprint $table) {
        $table->dropColumn('facebook_id');
    });
}


