I have a mobile html Facebook app which has a control to upload files (a simple input file). I can upload fine when I open the app in a browser like this apps.facebook.com/m
For me the problem was the accept attribute of the file input.
This doesn't work on native Facebook browser on mobile devices:
accept=".jpg,.jpeg,.png,.svg,.tiff,.bmp,.webp,.bpg"
So my solution was to detect if its a native FB browser, and remove that attribute:
let isFacebookApp = function () {
let ua = navigator.userAgent || navigator.vendor || window.opera;
return (ua.indexOf("FBAN") > -1) || (ua.indexOf("FBAV") > -1);
};
if (isFacebookApp) {
$('#myinput').removeAttr('accept');
}