How do I get a custom tweet button where the message that appears when clicked is something that I have written on the webpage. So if I say “I have just bought my Christmas presents!” on the website, i want a tweet button that when clicked the message comes up with “I have just bought my Christmas presents!” for the person to tweet.

Can anyone help

You can set an extra attribute on your embed code: data-text=“I have just bought my Christmas presents!”, which sets the default text in the Tweet box when a user clicks.

Check out the Tweet Button documentation here: https://dev.twitter.com/docs/tweet-button#properties, you can also set a list of hashtags, and other fields to be included in the Tweet.

@benward is it possible to update the data-text attribute dynamically, passing the pre-written text in the tweet field that pops up as a variable instead of a static text? I am trying to make this very simple node.js and socket.io based chat to collaborate on a tweet and I would like to tweet the latest chat message at any given point. A way to collaborate on a tweet before it’s put publically posted on Twitter.