WordPress.org

Ready to get started?Download WordPress

Forums

Really simple Facebook Twitter share buttons
[resolved] Facebook like button reports Javascript error (3 posts)

  1. bwooster47
    Member
    Posted 7 months ago #

    When using this plugin and the facebook like button, just loading a page shows this error in the Javascript console on Chrome browser:

    Uncaught SecurityError: Blocked a frame with origin "http://www.facebook.com" from accessing a frame with origin "http://www.example.com". Protocols, domains, and ports must match.

    This is related the the facebook like button, most probably.
    Seems like this may be a Facebook script problem. The "like" action seems to work anyway, but would be nice if this error could be avoided.

    I noticed this plugin may not be creating the right html - it is missing the http? It generates this:

    <div class="really_simple_share_facebook_like" style="width:100px;"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.example.com

    Note the src="//www.facebook.com" which seems wrong (though it will work, since http is default protocol?)

    Related, unresolved stackoverflow topic: facebook-iframe-tries-to-access-other-iframes

    http://wordpress.org/plugins/really-simple-facebook-twitter-share-buttons/

  2. bwooster47
    Member
    Posted 7 months ago #

    Finally got a better error message from the Javascript console!

    This error was due to a Chrome Extension - "Allow Right Click".

    So the code in this plugin is all fine. Disabling the bad extension made the error go away.

  3. whiletrue
    Member
    Plugin Author

    Posted 7 months ago #

    Perfect! Thanks for reporting it!

Reply

You must log in to post.

About this Plugin

About this Topic