samedi 3 décembre 2016

ClientException in Middleware.php line 68: Client error: 404

I'm new to socialite integration in laravel..

Thus finally I did social login for google & also facebook..

But, in LinkedIn it through me an error (exception) like this

ClientException in Middleware.php line 68: Client error: 404

@Route

Route::get('auth/linkedin', 'Auth\AuthController@redirectToLinkedin');
Route::get('auth/linkedin/callback', 'Auth\AuthController@handleLinkedinCallback');

@AuthController

public function redirectToLinkedin()
{
    return Socialite::with('linkedin')->redirect();
}

public function handleLinkedinCallback()
{
    //get the driver and set desired fields
        // $driver = Socialite::driver('linkedin')->fields(['first_name','last_name','email-address']);
    // retrieve the user
        // $user = $driver->user();

    $user       = Socialite::driver('linkedin')->user();
    echo "<pre>";print_r($user);exit();
}

Here, I just try to print all those values retrieved from LinkedIn

But,It always through me the exception as Client error: 404

@Services.php

'linkedin' => [
    'client_id' => 'MYClientID',
    'client_secret' => 'MYSecretKey',
    'redirect' => 'Mycallback URL',
],

How should I solve this issue..Could someone help me..

Thank you in advance



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire