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?
If I understand you correctly, you will want to use the Web Intent URL.
It can be formatted as such: https://twitter.com/intent/tweet?text=hello%20world&url=https://mergeworld.com/&via=wearemerge
(I am using the agency I work at URL and Twitter @ for an example).
This link would generate a tweet like so:
To provide some guidance on structuring the URL, this is how it works:
https://twitter.com/intent/tweet 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:
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 https://mergeworld.com/ for example would be done like such:
This is the tweet generated from that link:
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:
Finally, here is that result:
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: