I am going through the facebook authentication process to log my users into my site. Once a user is logged in I redirect to the profile page using:
resp.sendRedirect("/l/profile");
But when I get to the profile page, the URL ends /profile#_=_
This seems to be at the end of the URL redirected by facebook when it returns a code. Why is it sticking around, how do I get rid of it?
I'm guessing it's a byproduct of new feature called "Authenticated Referrals" whereby they add a valid accessToken to the end of the url as either an #anchor or ?param (depending on whether you're reading it client- or server-side). You can read more about it here: http://developers.facebook.com/docs/opengraph/authentication/
At any rate, because it's appended Facebook-side, you'll have to file a bug with them to fix it, although at the moment the tracker seems to be down for me.
来源:https://stackoverflow.com/questions/9123807/trailing-characters-in-url-after-facebook-login