WordPress.org

Forums

Facebook
[resolved] Help: how to display HTTP comments on HTTPS version of page? (3 posts)

  1. Mickey Kay
    Member
    Posted 1 year ago #

    We've got a client site that's available on both HTTP and HTTPS. Right now, the two versions of any given page are treated as separate by FB comments. What we want is to always force FB comments to always use the HTTP version of the page URL, both when creating new comments and displaying existing comments.

    Any thoughts on how to do this?

    Thanks!

    https://wordpress.org/plugins/facebook/

  2. Niall Kennedy
    Member
    Plugin Author

    Posted 1 year ago #

    The Facebook Comments Box social plugin accepts an href parameter specifying the URL related to the content.

    The page includes a <meta property="og:url"> element to collapse multiple references to the same content down to a single URL reference; /foo and /foo?source=email both contain an og:url of /foo and therefore map to the same object.

    The Facebook plugin for WordPress passes the get_permalink() value returned by WordPress through the facebook_rel_canonical filter to be added as an href parameter in the social plugin markup as well as the og:url of the page.
    https://github.com/facebook/wordpress/blob/master/social-plugins/class-facebook-comments.php#L460

  3. Mickey Kay
    Member
    Posted 1 year ago #

    Thanks for the reply! We actually worked it out ourselves just yesterday and published this blog post explaining it in case others might benefit:
    http://www.mightyminnow.com/2014/05/how-to-make-social-media-shares-counts-and-comments-work-across-http-and-https/

    Glad to have our suspicions confirmed!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.