Tweet button without javascript?


#1

Hi,

for compatibility reasons i can’t use javascript in my website.
So i’m wondering if i can create a dynamic link with server-side scripts and create an HTTP request to send Tweets from my website.

Something like this:

<div id="custom-tweet-button">
    <a href="https://twitter.com/share?source=tweetbutton&text=mytexthere&url=myurl" target="_blank"> Tweet </a>
</div>

is this accepted? is it a term of use violation or something similar?

Thanks in advance


#2

Instead of using the /share URL path, you should use the tweet web intent path like https://twitter.com/intent/tweet?text=mytexthere&url=myurl – there’s no problem with you opening these links in a new window like that – it’s a use case we explicitly support.


#3

I made a CSS-only version of the official Twitter button that looks exactly the same. See http://jpwright.net/css-twitter-buttons/


#4