10

Facebook Login

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

The domain became this

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

What is the #= behind how do i not display it?

Anshad Vattapoyil
  • 23,145
  • 18
  • 84
  • 132
CodeGuru
  • 3,645
  • 14
  • 55
  • 99

2 Answers2

15

Although this thread is old, but hope this might help someone else. I have seen some people resolve the problem by adding javascript code to the redirected page to remove the #_=_ from the location.

However, that is ugly for me. There is another way of solving this issue from back-end. You can make your redirect url to contains the your own anchor # so that it will overwrite the #_=_ added by facebook. For example, this is my Laravel's 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('/#');
}
Duc Vu Nguyen
  • 1,169
  • 9
  • 9
2

Yes they append it after redirecting from Facebook. There doesn't seem to be a way to remove it from your PHP/Laravel code.

But you can remove it using Javascript like here: stackoverflow.com/a/7297873/783875

Community
  • 1
  • 1
WebNovice
  • 2,230
  • 3
  • 24
  • 40