I've got a mobile web app (not iOS) that I'm trying to use the share dialogue on. I'm logging the output of the whole process, so I can see where the system is breaking down. When I test on a desktop browser, the whole thing works perfectly. However, when I test on my iPhone, the system stops at FB.login(). Looking at the logs, my webapp runs FB.getLoginStatus() just fine. The response is an object with status="unknown". I've got a callback function which logs "getLoginStatus response.status != connected" and then attempts to run FB.login(function(response){}). The first line of of the callback is an attempt to log "FB.login response". That line never gets logged. Nothing happens. It's as if the webapp gets to FB.login() and then doesn't do anything. I've tried running other functions in that spot (like FB.api()) and they give me the correct errors (no authToken). Any ideas what might be going on?
Example code:
FB.getLoginStatus(function(response) {
console.log('getLoginStatus response:');
console.log(response);
if(response.status != 'connected') {
console.log('getLoginStatus response.status != connected'); // THIS IS THE LAST THING I SEE IN MY CONSOLE
FB.login(function(response) {
console.log('FB.login response');
console.log(response);
if(response.status != 'connected') {
console.log('Failed to log in');
} else {
console.log('You\'re logged in');
}
});
} else {
console.log('You\'re logged in');
}
});
Yields the following logs:
getLoginStatus response:
Object {status: "unknown", authResponse: null}
getLoginStatus response.status != connected
To clarify: No error response and no further logs after this. Repeated clicks on the share button yield the exact same results.