Facebook Oauth登录Jquery Mobile#_ = _ [英] Facebook Oauth Login With Jquery Mobile #_=_

查看:145
本文介绍了Facebook Oauth登录Jquery Mobile#_ = _的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  http:// 

当我尝试使用Facebook登录Oauth时,我的jQuery手机在我的网页,我认为# = 是问题。



页面保持空白,没有任何反应。如果我删除# = ,一切正常,动作正常发生。



有没有人有任何想法如何解决?我注意到从Facebook上删除# = 是不可能的,所以也许从jQuery手机脚本中删除某些东西可能会用javascript解决,但是我不知道如何

解决方案

您可以尝试在html的开头强制删除哈希,像

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

理论上,例程将在$(document).ready :)之前调用(从未在jquery上尝试过手机)


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.

解决方案

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)

这篇关于Facebook Oauth登录Jquery Mobile#_ = _的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆