Tweet twitter user via href
4 answers
My guess is the closest you'll be using Twitter Tweet buttons unless you want to write your own backend service that you can access via HTTP GET, which in turn will need to interact with Twitter through its API.
Using the code generator above, you end up with a code that looks something like this, where you have to swap c_eliasson
which is my twist descriptor with the one you would like to use instead:
<a href="https://twitter.com/intent/tweet?screen_name=c_eliasson" class="twitter-mention-button" data-related="c_eliasson">Tweet to @c_eliasson</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
I would recommend using a code generator, although it gives you additional options to customize the look and feel.
+3
source to share
<a href="https://twitter.com/intent/tweet?screen_name=c_eliasson" class="twitter-mention-button" data-related="c_eliasson"> Tweet to @twitteralbgoom </a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id))
{ js=d.createElement(s);
js.id=id;
js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}
(document,"script","twitter-wjs"); </script>
0
source to share
<a href="https://twitter.com/intent/tweet?screen_name=c_eliasson" class="twitter-mention-button" data-related="c_eliasson">
Tweet to @twitteralbgoom
</a>
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
-2
source to share