Facebook Callback appends '#_=_' to Return URL

前端 未结 23 2091
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 14:56

Facebook callback has started appending #_=_ hash underscore to the Return URL

Does anyone know why? What is the solution?

23条回答
  •  暖寄归人
    2020-11-22 15:31

    Using Angular 2 (RC5) and hash-based routes, I do this:

    const appRoutes: Routes = [
      ...
      {path: '_', redirectTo: '/facebookLoginSuccess'},
      ...
    ]
    

    and

    export const routing = RouterModule.forRoot(appRoutes, { useHash: true });
    

    As far as I understand, the = character in the route is interpreted as part of optional route parameters definition (see https://angular.io/docs/ts/latest/guide/router.html#!#optional-route-parameters), so not involved in the route matching.

提交回复
热议问题