PHP Ignore Hash Header Header

Possible duplicate:
URL fragment and 302 redirects

I integrate the Facebook login on my site. When Facebook redirects to my site using the code request parameter, at the end there is a hash http://myurl.com/code=xxx#_=_ When I then redirect from this URL to another URL on my site:

 header('Location: http://myurl.com/home'); 

Saves the hash tag and ends as http://myurl.com/home#_=_

Is there a way to redirect without a hash, or if someone is familiar with Facebook to make it stop adding a hash in the first place?

+4
source share
2 answers

JavaScript seems to be the only way to remove the hash since the hash is never sent to the server in any way. So I added a script to a blank page:

 window.location.hash = ''; window.location.href = "http://myurl.com" 

This is the answer at the moment, but I agree better.

+2
source

You can redirect to your server side of PHP a URL that contains its own hash. This is what I had to make a ruby โ€‹โ€‹application that uses backbone.js.

PS - I pointed out that redirect_uri and FB still added a dumb line #_=_ : /

+2
source

All Articles