We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51142
    • 9 Posts
    I've added some social media links generated by ShareThis.com and I'm having a couple of strange problems.

    First, I guess the basic question is the ShareThis linking good to use at all?

    Second, tag replacement doesn't seem to work properly. I started by adding
    <span class='st_facebook' st_url="[[~[[*id]]]]"></span>
    but for some reason when the page is rendered the st_url value just comes out as index.php?id=7 (for example) - i.e. it's missing the root url. Note, I've put this span in a chunk which I called on the template.

    Third, if anyone reading this has any experience with the ShareThis linking could you tell me how to get the facebook link to include the content I specify - even putting it in og meta-data tags won't do it.

    Thanks in advance.
      • 47401
      • 295 Posts
      1) yes we use the sharethis on our website, its fine, no configuration at all on the modx side as its all front end code.

      2) [[~[[*id]]]] should produce the site_url, if not check site_url in config file. or try to output [[++site_url]] if nothing is shown then you know that the config variable site_url is not set correctly.
        • 51142
        • 9 Posts
        I've used [[++site_url]][[~[[*id]]]] as that's the only way I can get the full url to come out.
        But at least it show's that [[++site_url]] is correct.
          • 46886
          • 1,154 Posts
          I tried sharethis and failed, I believe I used Bookmarkthis instead.

          Here are some links regarding facebook. It can be tricky.



          My issues with facebook have been because I am using a forum and promoting forum posts.

            • 51142
            • 9 Posts
            Just to update on the Facebook problem with og tags - when I first tested a share I didn't have the og tags in the page. Apparently facebook caches a scrape of the page and that's it uses from then on, so even after I made the og changes they didn't appear to affect anything.
            You can use https://developers.facebook.com/tools/debug/ to force facebook to rescrape the page after you make changes to see if they work.