Twitter Hashtag button issue

Hi,

I am trying to create a Twitter button to help promote my local community website.

This is the code I have:

<a class="twitter-hashtag-button" href="https://twitter.com/intent/tweet?button_hashtag=#MyTownTogether">#MyTownTogether</a>

The button kind of works, but the field is empty. Does anyone know why this is?

Thanks

They don’t want the hash on the front of the keyword. <a class="twitter-hashtag-button" href="https://twitter.com/intent/tweet?button_hashtag=MyTownTogether">

# has a predefined meaning in a URL context - https://twitter.com/intent/tweet?button_hashtag=#MyTownTogether reads to a browser as "go to https://twitter.com/intent/tweet, send the query string button_hashtag= , and go to the anchor marker MyTownTogether

2 Likes

Thank you, that fixed it :slight_smile: