我正在尝试将Facebook登录功能添加到我的网站,但是在handleProviderCallback上出现此错误:
这是我的FacebookController代码:
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Response;
use Laravel\Socialite\Facades\Socialite;
class FacebookController extends Controller
{
public function redirectToProvider()
{
return Socialite::driver('facebook')->redirect();
}
public function handleProviderCallback()
{
$userSocial = Socialite::driver('facebook')->user();
dd($userSocial);
// $user->token;
}
}
有什么解决办法吗?