简体   繁体   中英

Laravel Socialite Facebook can't get user details

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
}

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM