Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author Mark

    (@markwolters)

    Hi Stefan,

    there are no known conflicts with Sucuri. Retrieving shares and likes works most of the time with other plugins, but there’s no 100% success rate. Sometimes the likes and shares fail to retrieve and the only solution is to retrieve them directly from the Facebook API. Perhaps you need to add a part to the code, if the og:url in your page source looks like this “og:url” content=”” you might have to add the content=”” part to the string replace in the code, like this:

    function rsssl_recover_shares($html) {
        //replace the https url back to http
        $html = str_replace('"og:url"= content="https://www.domain.com', 'og:url="https://www.domain.com', $html);
        $html = str_replace('data-href="https://www.domain.com', 'data-href="https://www.domain.com', $html); 
        return $html; 
    }
    add_filter("rsssl_fixer_output","rsssl_recover_shares");

    Mark

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi,

    I would like to stress that this is not caused by Really Simple SSL, but a result of the way social platforms count shares: counting shares separately for https and http.

    Looking at your code, it looks fine, but you might want to check if the string is an exact match with the string in your html. The quotes in your example are a single quote, in your code doublequote.

    ALso note that shareaholic offers a recovery feature, and that there’s also a plugin which handles recovery for you:
    https://really-simple-ssl.com/downloads/really-simple-ssl-social/

    Hope this helps!

    Plugin Author Mark

    (@markwolters)

    Hi,

    you might have to try to add a ” qoute to the start of the str_replace, like this:

    $html = str_replace("'name='shareaholic:url' content="https://www.vironika.org',"'name='shareaholic:url' content="https://www.vironika.org', $html);

    We cannot guarantee this will work, you might have to try some other quote options before it’s being replaced. Can you try that and let me know if it does the job?

    Mark

    Plugin Author Mark

    (@markwolters)

    Hi,

    you might have to fiddle around with the ” ‘ quotes a bit before it starts working, it should be possible but requires some trial and error.

    Mark

    Plugin Author Mark

    (@markwolters)

    Facebook can be a bit random about what likes and shares it returns sometimes, if this didn’t work, I’d suggest to look for a plugin solution that retrieves the likes/shares directly from the Facebook API, for example https://really-simple-ssl.com/downloads/really-simple-ssl-social/. That will return the correct count at all times.

    Mark

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Social Shares Count Recover After Moving to Https’ is closed to new replies.