Facebook Oauth Login with JQuery Mobile # _ = _

When I try to login using Facebook Oauth, everything goes fine as long as the url redirects the url like this:

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

I use jQuery Mobile in my pages and I think # = is a problem.

The page remains blank and nothing happens. If I remove the "# =", everything goes well and the action happens fine.

Does anyone know how to fix this? I noticed that deleting "# =" from Facebook will no longer be possible, so maybe deleting something from jQuery mobile script can solve this with javascript, but I don't know how to do it.

+8
jquery facebook mobile oauth
source share
1 answer

You can try forcibly removing the hash at the beginning of your html, something like

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

Theoretically, the procedure will be called up to $ (document) .ready :) (I never tried it on jQuery mobile, though)

+17
source share

All Articles