Guiding users from a public Tweet to a private conversation

When a Tweet is created with a standardized deep link to create a Direct Message, Twitter will turn that simple URL into a link with a clear call to action that guides a user straight into composing a new Direct Message.

Overview

  • When interacting with a customer on Twitter, you might want to take the conversation from the public timeline to a private Direct Message. To make this transition easier, you can include a specially formatted link in a Tweet, and we will automatically transform that link into a simple call-to-action. When a user clicks the call-to-action, they’ll be taken directly into the Direct Message compose experience with your username already selected, as well as the public Tweet visible for context. 

  • How does it work?
    Arrow down icon

    Using this new feature is easy. It requires that your Twitter account settings are set to “Receive Direct Messages from Anyone” (Settings > Security and Privacy > Privacy), and that you include a link in your Tweet using the following format.

    https://twitter.com/messages/compose?recipient_id={your account’s numeric user ID}

    That’s it! When you post the Tweet with that URL, the call-to-action will appear in supported clients. (Other clients will just see a deep link that is fully-functional.) 

    To find your User ID all you need to do is navigate to the Your Twitter data section in Settings and your User ID will be located right below your @username.

  • Frequently Asked Questions
    Arrow down icon

    Are there other parameters that I can use in these deep links besides specifying recipient?

    You can add a parameter &text={default text} to the end of the URL, and replace {default text} with the URL encoded text you’d like to pre-populate in the user’s compose box. For example, if you need a specific piece of information from the user, you could have that label appear in the user’s compose box for additional context (e.g., “Confirmation Number:”).

    Are there other ways to use this feature without pasting a link each time?

    While all you need for the call-to-action to display is to include the correctly formatted link in your Tweet, many Twitter Official Partners and other Twitter developer ecosystem tools have made it simple to include these links in your Tweets with the click of a button.

    How does this feature impact the character count in my Tweets?

    Twitter will shorten the deep link in your Tweet using t.co, and so the link will occupy 22 characters (the same amount as any t.co link). This is the case whether the call-to-action renders or does not render.

    Does the deep link for a Direct Message work outside of Twitter?

    Yes. The URL for a deep link to a Direct Message will attempt to open Twitter with a Direct Message compose window open if clicked from outside of Twitter.

    Why am I not seeing the formatted call-to-action in my Tweet reply?

    This may occur for a couple of reasons, including that you might not have set your setting to Receive Direct Message from anyone, or you may be viewing the Tweet in a 3rd party/unsupported Twitter client. Additionally, older Twitter clients may not render the call-to-action and only display the link.

    Why does the link I pasted in get removed and replaced with the “Send a private message” call-to-action?

    The URL will be stripped out of the Tweet display if it is located at the end of the Tweet. If the URL is in the middle or the beginning of the Tweet, the URL will still display in the Tweet. Regardless of if the URL is stripped out or not, the “Send a private message” call-to-action will display. 


Did we help answer your question?

The maximum length for this field is 5000 characters.
Success
Thanks for submitting feedback on this article!
Error
Problem sending form.

Visit Twitter Ads