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!
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.
-
☆ A M B ☆
- 209 Posts
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