Pre-populated tweet

Level 1

Pre-populated tweet



I am trying to create a link for a pre-populated tweet. I have followed numerous resources however I only create a link that pre-populates a link for the customer to share, I am looking to create a link for a pre populated tweet that has text as aswell as the link. 


Basically I want the link to direct them to twitter and give them a pre populated tweet which would look something like this, 


I'm taking part in X campaign, join me (website link) #campaignname 


Has anyone done this and can advise?





Level 2

Re: Pre-populated tweet

Hey @KatieWainwright,


If I understand you correctly, you will want to use the Web Intent URL.


It can be formatted as such:

(I am using the agency I work at URL and Twitter @ for an example).


This link would generate a tweet like so:

Screenshot 2023-10-19 at 11.43.47 AM.png


To provide some guidance on structuring the URL, this is how it works: is the base URL


You then add a '?' to the end of the URL like this:

This allows you to start adding the parameters. Let's add text that says 'I'm taking part in X campaign, join me'


You would put the parameter after the '?' in this case, 'text' (as referenced in the Web Intent URL page), and begin inputting your tweet text:'m%20taking%20part%20in%20X%20campaign,%20join%20me


As you can see, for spaces, you use the %20 between the words in the URL.

If you would then like to add a link, you simply add a '&' to the end of the link to indicate you are adding a new parameter. For this example adding a link, the parameter is simply 'url'. So adding a link to for example would be done like such:'m%20taking%20part%20in%20X%20campaign,%20join%20me&url=


This is the tweet generated from that link:

Screenshot 2023-10-19 at 11.55.53 AM.png


To add the hashtag, it can be appended to the link as such using the 'hashtags' parameter. Remember, I needed to add a '&' to indicate a new parameter is now being added:'m%20taking%20part%20in%20X%20campaign,%20join%20me&url=


Finally, here is that result:

Screenshot 2023-10-19 at 12.05.19 PM.png  


There are more parameters that can be added, but it follows this same structure as shown above.

If you have any specific questions, please let me know!


Tip: If you have multiple hashtags, you can add them all by separating using a comma like:


Tyrell Curry
Marketo Web Developer @ MERGE
Level 10 - Community Moderator

Re: Pre-populated tweet

Better to build this using Velocity, I'd say, so you ensure proper URL encoding (which goes beyond the space – in fact the space is the least important character to pre-encode!).