title: Client error: `POST https://graph.facebook.com/v3.0/oauth/access_token` resulted in a `400 Bad Request`
body: <p>Client error: <code>POST https://graph.facebook.com/v3.0/oauth/access_token</code> resulted in a <code>400 Bad Request</code> </p>
  
  <blockquote>
    <p>response: {"error":{"message":"\u05d0\u05d9\u05df
    \u05d0\u05e4\u05e9\u05e8\u05d5\u05ea \u05dc\u05d8\u05e2\u05d5\u05df
    \u05d0\u05ea (truncated...)</p>
  </blockquote>
  
  <p>install socialite package in laravel</p>
  
  <pre><code>public function Callback(Request $request, $provider)
  {
       try {
          $userSocial = Socialite::driver($provider)-&gt;stateless()-&gt;user();
  
      } 
  
      catch (Exception $e) {
  
          return redirect ('/');
      }
      if (!$request-&gt;has('code') || $request-&gt;has('denied')) {
          return redirect('/');
      }
  
      //$userSocial =   Socialite::driver($provider)-&gt;stateless()-&gt;user();
      $users       =   User::where(['email' =&gt; $userSocial-&gt;getEmail()])-&gt;first();
      if($users){
          Auth::login($users);
          return redirect('/home');
      }
      else
      {
          $user = User::create([
              'name'          =&gt; $userSocial-&gt;getName(),
              'email'         =&gt; $userSocial-&gt;getEmail(),
              'image'         =&gt; $userSocial-&gt;getAvatar(),
              'provider_id'   =&gt; $userSocial-&gt;getId(),
              'provider'      =&gt; $provider,
          ]);
          return redirect()-&gt;route('/home');
      }
  </code></pre>
  
  <p>Any help is really appreciated.</p>