As per https://developers.facebook.com/docs/plugins/embedded-posts/
Sometime in mid October 2024, our embedded posts have stopped working for mobile devices on wordpress website.
It works fine for desktop, but mobile it breaks.
The plugin/code detects a mobile device and changes using https://facebook.com to https://m.facebook.com causing a http 400 error.
Console logs:
Refused to display 'https://m.facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny'.
code used on word press post:
<div class="fb-post" data-href="https://www.facebook.com/PawsClawsAdoption/posts/929565525876422" data-width="500"></div>
or
[facebook_post url="https://www.facebook.com/PawsClawsAdoption/posts/929565525876422" width="500"]
URL that mobile generates and uses in the iframe (broken)
https://m.facebook.com/plugins/post.php?app_id=310860795753134&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df0180052a8332b903%26domain%3Dwww.pawsandclawsadoptions.com.au%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fwww.pawsandclawsadoptions.com.au%252Ff27eac462160384b6%26relation%3Dparent.parent&container_width=274&href=https%3A%2F%2Fwww.facebook.com%2FPawsClawsAdoption%2Fposts%2F929565525876422&locale=en_US&sdk=joey
URL desktop generates in iframe (working)
https://www.facebook.com/v2.0/plugins/post.php?app_id=310860795753134&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df002d2a99d7f8fdbc%26domain%3Dwww.pawsandclawsadoptions.com.au%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fwww.pawsandclawsadoptions.com.au%252Ff1cdcf9040098cca1%26relation%3Dparent.parent&container_width=292&href=https%3A%2F%2Fwww.facebook.com%2FPawsClawsAdoption%2Fposts%2F929565525876422&locale=en_US&sdk=joey&width=500