Facebook Oauth Login With Jquery Mobile #_=_

∥☆過路亽.° 提交于 2019-12-30 03:22:31

问题


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.


回答1:


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)



来源:https://stackoverflow.com/questions/8069704/facebook-oauth-login-with-jquery-mobile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!