s9e / TextFormatter

Text formatting library that supports BBCode, HTML and other markup via plugins. Handles emoticons, censors words, automatically embeds media and more.
MIT License
233 stars 36 forks source link

Facebook embeds not working if on mobile #240

Closed wolnavi closed 2 weeks ago

wolnavi commented 2 weeks ago

Hi, not sure if this is the right place to seek help so apologies if this is the wrong place..

I am browsing a public forum and I think they are using your plugin. So if i'm on a desktop PC, I am able to view Facebook embeds. However if i'm on mobile or if I try to emulate(?) the browser's view to mobile view via Chrome's DevTools on PC, the said Facebook embed is no longer viewable.. Wondering if you are able to fix it..? I tried to use the Fatdown demo and the same issue persists

PC view: image

Mobile view: image

JoshyPHP commented 2 weeks ago

Hi,

Yes, this is as good a place as any, no worries.

I've just checked Facebook and indeed, the content doesn't load when emulating a mobile browser in Chromium or Firefox. I have confirmed that this is not only the case for the way this library works specifically but also when using Facebook's official embed code. As far as I can tell, Facebook automatically redirect mobile browsers to the m.facebook.com domain, which is configured to prevent embedding via an iframe. That's an oversight on their part and only Facebook would be able to fix it. I'm surprised they haven't fixed it already.

So, for now there's nothing we can do about it. You can try contacting Facebook if they have a way to report bugs, otherwise we'll just have to wait for someone working there to notice it.

I'm going to close this issue for now but feel free to reopen if you get more info or if embeds work when using Facebook's official code but not when using this library.

wolnavi commented 2 weeks ago

Alright, I've reported it to them, hopefully they will see