Announcing the Message Button for websites



We are excited to announce a new button that enables people to start a Direct Message right from a website. Direct Messages are the private side of Twitter, and the message button makes it easy to start a private conversation with you. It works best when your account settings allow you to receive Direct Messages from anyone, whether or not they follow you. The button is available at along with all of our other buttons - scroll down the page below the input box, and select the Twitter Buttons option.

In order to obtain a button that works correctly we require two pieces of information:

  1. Your username, which can either come in the form of “@username” or “
  2. Your user ID, which is a numerical identifier that can be found at

Once you put these two pieces of information into the configurator correctly you’ll get the code to implement the button on your web properties.

If you’re having issues try these things:

  1. Make sure if you’re using your username for field 1 that you have the @ in front
  2. Make sure the user ID you input is the user ID for the username in field 1
    *note: we are not validating the numeric user ID to a username, so if they do not match you will not see an error, but the button will not work correctly.

Please let us know if you have any questions!

Pop-up for direct messages to my followers


I’m trying to make the button, but all I get when pasting my handle (ig is two options

No DM button option.
Or do I have to enter my account number? But Where and how?


Try scrolling down and selecting the Twitter buttons option lower down the page. That should give you an option of five different button types.

If you’re only seeing the two (follow and mention) when you paste in a user profile link to the main input box, that looks like a bug we should sort out - I just confirmed this, and I’ve opened a ticket to get it sorted out. Sorry for the confusion!


For our web visitors to use the DM button, I’m assuming they need to have a Twitter account no? Otherwise, they will likely be prompted to sign up for a Twitter account?


That’s correct, they would be asked to sign in to a Twitter account (and if not then they would have to create one).


Thanks, Andy. I thought I better verify my obvious assumption before
running this by our team. One more question, do you have a sample of what
the DM button will look like on the website? I’m asking to find out how
much space it will need. Currently, we have ourCompany tweets showing up
(auto-populating on our website), so it’ll be good to see what it would
look like.


I’ve just generated a button for myself, and here are the two versions (regular and large sizes - you make the latter by adding data-size="large" to the markup) - these are just screenshots, and are not clickable buttons here on the forums!


Thank you.

Normel Martinez


I’m hitting the same issue as Hermaniak. What’s the timeline for a fix on this bug please?


The button is available if you scroll down the page without pasting anything into the input box, and select the Twitter Buttons option. It was actually a deliberate choice to implement it this way, since the DM button requires additional information and cannot be immediately generated from a single URL.