javascript - FB.login not firing for HTML5 iOS web app -
this non native solution, responsive website i'm building. works fine in browser, nothing happens when call fb.login();
$(function() { $.getscript("https//connect.facebook.net/en_us/all.js", function() { fb.init({ appid : fbappid, status : true, cookie : true, oauth : true }); alert(fb); // [object object] fb.getloginstatus(function(response) { alert(response.status); // if ios simulator logged facebook // says "connected" // if ios simulator not logged in // says "unknown" }); fb.login(function(res) { // never gets here on ios simulator // works fine on browsers }); } });
the problem when i'm not logged facebook, i'm trying app pop open facebook looking screen. never gets inside of fb.login, though same code works in browser.
thanks can help!
it turns out, can't call fb.init , fb.login() on mobile browser. trying save loading sdk until user needed login, guess have use hover intent or else.
once loaded sdk on page load, did fb.login() onclick() enough working.
pita
Comments
Post a Comment