Laravel Socialite Facebook can't get user details

1k views Asked by At

I am following the following tutorial
http://tutsnare.com/social-authentication-in-laravel-5/
I have followed the steps exactly as said, but when I try to dump my user object which I retrieved using the following code:

$user = Socialize::with('github')->user();
dd($user);

This is not giving any output. However

$user = Socialize::with('github');
dd($user);

Does return the following object:

GithubProvider {#194 ▼
  #scopes: array:1 [▶]
  #request: Request {#37 ▶}
  #clientId: "a client id here"
  #clientSecret: "a client secret here"
  #scopeSeparator: ","
  #encodingType: 1
  #stateless: false
  +"redirectUrl": "My redirect URL
}
1

There are 1 answers

0
Anand Singh Kunwar On BEST ANSWER

When I set up my server, the machine generated an SE Linux Error, saying that httpd service tried to save in logs of laravel.
I noticed this error later and stackoverflowed the error, finding the following solution.
SELinux prevented httpd(usr/sbin/httpd) write access to /var/www/html/bookings/templates_c
Did as said in the question and voila! Done!