-2

Possible Duplicate:
Facebook Callback appends ‘#_=_’ to Return URL

Well its not an problem that i am facing since its not mixing up in any way with my code, but just an curiosity to know why the URL of my app gets appended by this extra characters as #= when user logs into my site using Facebook api ?

For eg my url should be

 www.xyz.com/viewResume

but it actually is

 www.xyz.com/viewResume#_=_

Any particular reason for this behaviour ? Am using Codeigniter Framework

Community
  • 1
  • 1
Jigar Jain
  • 1,447
  • 1
  • 15
  • 38

1 Answers1

3

I forget why it does it, I searched for a while too but it's just remnants of the return URL FB posts if I remember right. It's pretty easy to make go away with a little js on the page that you send users back to after login though.

    <script type="text/javascript">
    $(document).ready(function(e){
    if (window.location.hash == '#_=_') {
        window.location.hash = ''; // for older browsers, leaves a # behind
        history.pushState('', document.title, window.location.pathname); // nice and clean
        e.preventDefault(); // no page reload
    }
    });
</script>
Rick Calder
  • 18,310
  • 3
  • 24
  • 41