We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12043
    • 10 Posts
    I’m having trouble getting a proper thumbnail to display when submitted to stumbleupon and the Open Graph Protocol doesn’t do it. Has anyone else used the custom badge API before? Javascript is something I really don’t know how to use very well and I was wondering if someone had some code I could I could use (with whatever changes necessary). Thanks!
      • 34162
      • 1 Posts
      I think its get some difficult for me and let it be I will refer and five the code or otherwise tyou can get it form the tutorial sites.
        • 36984
        • 1 Posts
        Have you tried stumpleupon's help center? http://www.stumbleupon.com/help/
          • 36786 ☆ A M B ☆
          • 209 Posts
          Ben Morrison Reply #4, 15 years ago
          I use this bit of code in the footer of my pages, seems to work for me. The template variable is self explanatory.

          <script type="text/javascript">
          var imgHz=400;
          var imgWz=400;
          var sImageURLz='[[*thumbnail]]';
          var sURL1z='http://www.stumbleupon.com/refer.php?url=http%3A//';
          var sURL2z='[[~[[*id]]? &scheme=`full`]]';
          if (document.referrer==(sURL1z+sURL2z)){
          document.write('<div  style="position: absolute; top: 20px; left: 50px; background-color: azure;"><img src="'+sImageURLz+'" height="'+imgHz+'px" width="'+imgWz+'px"></div>');
          }
          </script>

            Ben Morrison
            Hacking templates to pieces since 2003