I'm building a Facebook Page Tab app using ASP.NET MVC.
I've setup the mobile redirect using the answer from this post about How to create a mobile accessible Facebook Page Tab app.
I am now trying to add Facebook login functionality as follows
$('#button-login').on('click', function (e) {
e.preventDefault();
FB.login(function (response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your app
var userId = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
$('<form>', {
'action': '/login',
'method': 'post',
'html': '<input type="hidden" name="accessToken" value="' + accessToken + '" />'
}).appendTo(document.body).submit();
} else if (response.status === 'not_authorized') {
// ths user is logged into Facebook, but has not authenticated your app
} else {
// the user isn't logged into Facebook
}
}, { scope: 'public_profile, email' });
});
This works fine on desktop. When attempting to login on mobile I end up getting a Facebook error page with the following message
Sorry, this feature isn't available right now: An error occurred while processing this request. Please try again later.
Any ideas about what workarounds are available?