Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Oauth Login With Jquery Mobile #_=_

When I try to login using Facebook Oauth all goes ok until the part the url redirects with something like this:

http://mywebsite.com/facebookoauthbackpage.php#_=_

I'm using jQuery Mobile on my pages and I think that #= is the problem.

The page stays blank and nothing happens. If I remove the "#=" all goes alright and the action happens normally.

Does anyone have any idea on how to fix that? I've notice that removing the "#=" from the Facebook will not be possible anymore, so maybe removing something from the jQuery mobile script may solve that with javascript, but I don't know how to do that.

like image 519
Caio Calderari Avatar asked Nov 09 '11 18:11

Caio Calderari


1 Answers

You could try to forcefully remove the hash at the beginning of your html, something like

<script>
if (window.location.hash == "#_=_")
        window.location.hash = "";
</script>

Theoretically the routine will be called before $(document).ready :) (never tried it on jquery mobile though)

like image 166
azureru Avatar answered Oct 12 '22 23:10

azureru