Facebook callback has started appending #_=_
hash underscore to the Return URL
Does anyone know why? What is the solution?
Facebook callback has started appending #_=_
hash underscore to the Return URL
Does anyone know why? What is the solution?
I know this reply is late, but if you are using passportjs, you might want to see this.
I have written this middleware and applied it to express server instance, and the original URL I've got is without the
"#_=_"
. Looks like it when we apply passporJS' instance as middleware to the server instance, it doesn't take those characters, but are only visible on the address bar of our browsers.TL;DR
Full version with step by step instructions
Step by step:
fragment
is#_=_
.#
and taking only the first part.history
to replace the current page state with the clean URL. This modifies the current history entry instead of creating a new one. What this means is the back and forward buttons will work just the way you want. ;-)#_-_
.Learn more about
history.replaceState
.Learn more about
window.location
.Not sure why they're doing this but, you could get around this by reseting the hash at the top of your page:
A change was introduced recently in how Facebook handles session redirects. See "Change in Session Redirect Behavior" in this week's Operation Developer Love blog post for the announcement.
This would remove the appended characters to your url
Major annoying, especially for apps that parse the URI and not just read the $_GET... Here's the hack I threw together... Enjoy!