ShareThis Forums » ShareThis Wish List

can't get custom to work

(2 posts)
  • Started 7 months ago by standifer
  • Latest reply from ShareThisSupport

  1. standifer
    Member

    i'm using the directions from this page...
    http://support.sharethis.com/developers/developers-faq/stapi/62

    to ceate my custom button. i changed the <img src=“/my_share_icon.gif” /> to call my image from my server, and then pasted this code into the widget code in wordpress under
    Options > Share This.

    it's not working. page shows no image, no link. any idea what i'm doing wrong?

    Thanks!

    <script language=”javascript” type=”text/javascript”>
    //Create your sharelet with desired properties and set button element to false
    var object = SHARETHIS.addEntry({
    title:’share’,
    summary: ‘Sharing is good for the soul.’},
    {button:false});
    //Output your customized button
    document.write(‘<span id=”share”><img src=“/my_share_icon.gif” />Share!</span>’);
    //Tie customized button to ShareThis button functionality.
    var element = document.getElementById(“share”);
    object.attachButton(element);
    </script>

    Posted 7 months ago #
  2. Hello,

    It looks like all of your single quotes are backticks. This could be the case in your code if you copied and pasted from the support site and only changed the image.

    Other than that the code checks out.

    Also, the widget code must be injected into the head of the document in order to use the .addEntry function call. This is the code obtained from the configuration tool at http://sharethis.com/publisher?type=stapi.

    Hope this helps!

    Posted 6 months ago #

RSS feed for this topic

Reply

You must log in to post.