I’m trying to address the issue with Facebook OAuth and jQuery Mobile as described at the bottom of http://jquerymobile.com/test/docs/pages/page-navmodel.html .
On a registration page I have a “Sign in with Facebook” button. When I click the button I get a “Page Load Error”.
Added to the registration page:
<div data-role="page" id="register">
<script>
$("#register").live('pageinit',function() {
if (window.location.hash == "#_=_")
window.location.hash = "";
});
</script>
</div>
but that didn’t help – still same problem. Any ideas what I’m doing wrong here?
Sorry, but this was a red herring. The script was actually working. The “Page Load Error” issue was due JQM expecting ajax page load, when it wasn’t. Adding
data-ajax="false"to the link solved the problem. This is explained in http://jquerymobile.com/test/docs/pages/page-links.html.