28

My team is in charge of some difficulties with an app on Facebook. We believe this occurred some error in loading the iframe. We discovered this error through Firebug:

Load denied by X-Frame-Options: https://www.facebook.com/dialog/oauth?client_id=140656472747871&redirect_uri=https%3A%2F%2Fnuvemapps.com.br%2Fci%2Fncupons%2Fhome%2F%3Ffb_source%3Dsearch%26ref%3Dts%26fref%3Dts&state=32e667a3645c047d751d20811d49ef6b&req_perms=email%2C+publish_steram%2C+manage_pages does not permit framing.

This happens mainly with people who have not allowed the app, so we do not know specifically where this problem is starting. We still have three possible causes left:

  • Server Configuration
  • Problem with our coding
  • Or in our setup facebook app dev

Can anyone help in identifying this error?

Here is the link to the app: https://apps.facebook.com/cupomigo

APerson
  • 8,140
  • 8
  • 35
  • 49
Diogo Souza
  • 298
  • 1
  • 3
  • 7
  • Isn't this a security thing? If you could load facebook login into an iframe then you could do click jacking. – Ian Warburton Feb 22 '15 at 22:12
  • If you're in control of the server this is running on, check what security middleware you might be using. For example, I'm running a node server and I had to disable xssFilter middleware and frameguard middleware. Now this error is gone. – Stephen Tetreault Oct 16 '17 at 21:04

4 Answers4

21

I used target="_top" for the link, and it is now working perfectly.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Altaf Hussain
  • 5,166
  • 4
  • 30
  • 47
3

Use this line given below instead of header() function.

echo "<script>window.top.location = 'https://apps.facebook.com/yourappnamespace/';</script>";
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Hemanta Nandi
  • 141
  • 1
  • 4
1

Just add

https://www.facebook.com/plugins/video.php?href=""

Before your link:

https://www.facebook.com/plugins/video.php?href="https://yourlink.com"
Taha
  • 11
  • 1
0

In my case I had the same error, but for the comment plugin, I don't know if it helps but I solved it by inserting the moderation or administration meta-tag

<meta property="fb:app_id" content="&#123;YOUR_APP_ID&#125;" />

Anyway, if the user is not logged into Facebook you will still have the same problem. I hope I have been helpful, good work.

Leonardo Ciaccio
  • 2,846
  • 1
  • 15
  • 17