Sign Up |

Adding the New Twitter Button

(2 posts) (2 voices)
  1. jonmrich Posted 1 year ago #

    Adding the new twitter button was a bit of a pain, so I'll add a couple of pointers here since I got it working.

    First, if using the vertical twitter button and vertical share bar, the sharebar isn't wide enough for the standard twitter vertical button. You don't need a big change, but edit the sharebar.css file's first line and make the width 65. It should be this:

    #sharebar { display: none; position: absolute; width: 65px; float: left; background: #fff; padding: 0; text-align: center; border: 1px solid #ccc; list-style: none; margin: 0; z-index: 99; top: 230px; }

    The twitter code should be something like this...you have to add the button using the "Add new button" option on the Active Buttons screen in Sharebar:
    <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
    <div>
    <a href="http://twitter.com/share" class="twitter-share-button"
    data-via="jonmrich"
    data-related="doseofdigital:The latest on digital in pharma and healthcare"
    data-count="vertical">Tweet
    </div>

    Change the "data-via" to whatever twitter account you want included in the tweet. "data-related" shows up on the screen after you post the tweet and gives the user the option to follow one other account. Change this to whatever you want as well or delete. The account you included in the "data-via" will automatically show up on the recommended page too.

    You can edit a lot of this and add more refs by following the info on this page: http://dev.twitter.com/pages/tweet_button

    Good luck

  2. Monjurul Dolon Posted 1 year ago #

    Thanks for the heads up, I've updated the plugin and pushed an update!


Reply

You must log in to post.

© Copyright 2010 DevGrow - Design. Develop. Grow. 20 queries. 0.32 seconds.