angular-facebook icon indicating copy to clipboard operation
angular-facebook copied to clipboard

Refused to display 'https://www.facebook.com/' in a frame because it set 'X-Frame-Options' to 'DENY'.

Open paramsinghvc opened this issue 10 years ago • 2 comments

When I logout of my Facebook page in another tab on the same browser and then I try to logout of my angular app it gives me this error Refused to display 'https://www.facebook.com/' in a frame because it set 'X-Frame-Options' to 'DENY'. But if I'm logged in into facebook and then logout it works fine. How can I detect an event that is triggered when the user logs out from fb in another tab?

paramsinghvc avatar Mar 24 '15 08:03 paramsinghvc

You need to add your website url in facebook developer admin ... get into facebook dev platforma chose your aplication and go to settings ... on the bottom add a web platforma and type there your domain .... that thing helped me to erase the console error ..

ghost avatar Oct 18 '17 08:10 ghost

Use script

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Instead of

`<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v11.0&appId=xxxxxxxxxxxxx&autoLogAppEvents=1" nonce="PZP7X1PT"></script>`

ntduoc avatar Jul 29 '21 10:07 ntduoc