title: How to link a Social Media account using Laravel Socialite
body: <p>I'm using Laravel Socialite to let the user login using fb, twitter or google which works well. But, there's part of the application that allows the user to link its other social account if they also want to use them when logging in, in short multiple sign in options for a single account. My problem now is, I don't know how to attain since I really don't have idea and I can't find some guide in the internet. I have tried re-using the callback function but it is not even getting inside the function. Here's what I have tried:</p>
  
  <pre><code> public function linkMedia(Request $request, SocialMedia $social)
   {
      $provider = $request-&gt;route('provider');
  
  
      return Socialite::driver($provider)-&gt;with(['type' =&gt; "link"])-&gt;redirect();
  }
  
  //callback function with my sign up with social media
  public function handleProviderCallback(Social $service, $provider)
  {
      try {
          $user = Socialite::driver($provider)-&gt;user();
      } catch (\Exception $e) {
          return redirect('/')-&gt;withErrors([__('names.generalError')]);
      }
      dd($user);
  }
  </code></pre>
  
  <p>If you have some suggestions or resources for tutorials, please let me know. Thank you in advance for your help. Been stuck for 2 days now.</p>