Facebook login c # _ = _ behind url

Facebook login

// Get the page we were before $redirect = Session::get('loginRedirect', 'hirer/account'); 

The domain has become this

  http://domain.com/hirer/account#_=_ 

What is # = behind how I don't display it?

+6
source share
2 answers

Although this thread is outdated, but hope this can help someone else. I saw some people solve the problem by adding javascript code to the redirected page to remove # _ = _ from the location.

However, this is ugly for me. There is another way to solve this problem from the source. You can make your redirect URL contain your own # anchor so that it rewrites the # _ = _ added to facebook. For example, this is my Laravel handleProviderCallback:

 public function handleProviderCallback() { $user = Socialize::with('facebook')->user(); // add the user to your database if it doesn't exist // redirect the user to home page, the anchor # is // to overwrite #_=_ anchor added by facebook return redirect('/#'); } 
+10
source

Yes, they will add it after the redirect from Facebook. There seems to be no way to remove it from your PHP / Laravel code.

But you can remove it using Javascript, like here: fooobar.com/questions/16605 / ...

+2
source

Source: https://habr.com/ru/post/955480/


All Articles