dongsu3664 2013-10-08 11:06
浏览 51
已采纳

Facebook使用#_ = _后面的URL登录

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?

  • 写回答

2条回答 默认 最新

  • douhandie6615 2016-04-29 20:00
    关注

    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('/#');
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点
  • ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改