带有handleProviderCallback的“无消息” InvalidStateException

时间:2018-11-22 18:04:45

标签: php laravel callback facebook-login laravel-socialite

我正在尝试将Facebook登录功能添加到我的网站,但是在handleProviderCallback上出现此错误:

enter image description here

这是我的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;
    }
}

有什么解决办法吗?

0 个答案:

没有答案