0

I'm using omniauth-facebook gem and it works well.

But when it loads back the page on the application it adds these characters to the url:

/#_=_

How can I stop this from happening.

NOOB

chell
  • 7,646
  • 16
  • 74
  • 140
  • You can’t. Only thing you can do is try to redirect to the same URL without the hash part, or setting it to blank using `location.hash` in JavaScript. – CBroe Mar 12 '13 at 09:53
  • check this http://stackoverflow.com/questions/7693663/remove-from-the-facebook-redirect-url – suren Mar 13 '13 at 18:18

2 Answers2

0

Try this:

<script type="text/javascript">
            if (window.location.hash == '#_=_')window.location.hash = ''; //this script removes the #_=_ from the url which is appended by facebook after login
</script>
Gaurav Pandey
  • 2,798
  • 4
  • 28
  • 41
0

Try this:

<script type="text/javascript">
if(window.location.hash=="#_=_") window.location.href="http://yourdomain.com/";
</script>
Cristi Berceanu
  • 1,693
  • 1
  • 10
  • 12