Skip to content
Advertisement

Argument passed to (Symfony) Response::setContent() must be of the type string or null, object given

I try to sign up by Facebook, using Laravel 7 and package (Socialite), when press on the URL:

JavaScript

The redirect page runs the app, i created in facebook developers as the img:

enter image description here

when press (continue as Mahmoud) and put my email and pass this error shows:

TypeError Argument 1 passed to SymfonyComponentHttpFoundationResponse::setContent() must be of the type string or null, object given, called in C:wamp64wwwStartervendorlaravelframeworksrcIlluminateHttpResponse.php on line 65

and URL upove chrom box the following:

JavaScript

my Routes:

JavaScript

Controller:

JavaScript

.env:

JavaScript

config/services.php:

JavaScript

in config/app.php i added:

JavaScript

and

JavaScript

please could you help me i try lot of solutions but no way.

Advertisement

Answer

i should return a Response instead of the $user object in controller

change

JavaScript

to

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement