Encountering this message in the console: Refused to display in a frame due to 'X-Frame-Options' set to DENY
This issue arises when the website is displayed in its mobile version, which involves a distinct set of HTML and assets provided if the user agent is a mobile device.
The console error message points to m.facebook.com.
FB.ui(
{
method: 'share',
href: 'https://www.espn.com/mlb',
},
function(response) {
if (response && !response.error_code) {
console.log('shared_post');
//facebook_post_to_fanpage(access_token_data, link_id, song);
return true;
} else {
return false;
}
}
);
I can successfully utilize the FB.api on the mobile site, including login and getauth functions without issue. However, encountering difficulties when trying to use FB.ui for both share and feed methods.
I assumed I wouldn't face any problems since I was using the Facebook JavaScript SDK.