OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Facebook Like Button Iframe Error for Guests Only

  • Thread starter Thread starter Steve Payne
  • Start date Start date
S

Steve Payne

Guest
I'm having a very strange issue with my Facebook like button. When i'm logged into Facebook.. everything works fine.

When I click the button when i'm not logged in, my like button actually tries to load www.facebook.com inside of the like button through an iframe.

This gives an error stating

Code:
facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

I have tried updating the code to the newest javascript (in testing) and other types of configurations, with no luck.

Here is my page to see this happening: https://www.infinitesweeps.com/sweepstakes/roundup/

Code:
<div class="fb-like" data-href="https://www.infinitesweeps.com/sweepstakes/roundup/" data-width="335" data-layout="standard" data-action="like" data-size="large" data-share="true"></div>
<script>
loadScript("https://connect.facebook.net/en_US/sdk.js#xfbml=1&appId=176508242428601&version=v8.0&cookie=1");
</script>

Nothing really fancy..

Do you see anything wrong?
<p>I'm having a very strange issue with my Facebook like button. When i'm logged into Facebook.. everything works fine.</p>
<p>When I click the button when i'm not logged in, my like button actually tries to load <a href="http://www.facebook.com" rel="nofollow noreferrer">www.facebook.com</a> inside of the like button through an iframe.</p>
<p>This gives an error stating</p>
<pre><code>facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny'.
</code></pre>
<p>I have tried updating the code to the newest javascript (in testing) and other types of configurations, with no luck.</p>
<p>Here is my page to see this happening: <a href="https://www.infinitesweeps.com/sweepstakes/roundup/" rel="nofollow noreferrer">https://www.infinitesweeps.com/sweepstakes/roundup/</a></p>
<pre><code><div class="fb-like" data-href="https://www.infinitesweeps.com/sweepstakes/roundup/" data-width="335" data-layout="standard" data-action="like" data-size="large" data-share="true"></div>
<script>
loadScript("https://connect.facebook.net/en_US/sdk.js#xfbml=1&appId=176508242428601&version=v8.0&cookie=1");
</script>
</code></pre>
<p>Nothing really fancy..</p>
<p>Do you see anything wrong?</p>
Continue reading...
 

Latest posts

Top